Use plone.recipe.codeanalysis

Integrate plone.recipe.codeanalysis in the buildout and correct the trivials
errors.
This commit is contained in:
Florent Michon 2013-10-05 18:00:43 -03:00 committed by Nejc Zupan
parent e12a6c08b3
commit 7a75f794e5
6 changed files with 26 additions and 2 deletions

View File

@ -39,6 +39,7 @@ $(python):
tests: .installed.cfg
@bin/test
@bin/flake8 src/plone/api
@bin/code-analysis
clean:
@rm -rf .coverage .installed.cfg .mr.developer.cfg bin docs/html htmlcov \

View File

@ -6,6 +6,7 @@ test-eggs = Pillow
parts +=
omelette
scripts
code-analysis
# network speedup
socket-timeout = 5
@ -25,8 +26,23 @@ dependent-scripts = true
interpreter = zopepy
eggs = plone.api [develop]
[code-analysis]
recipe = plone.recipe.codeanalysis
directory = ${buildout:directory}/src
pre-commit-hook = True
flake8-max-complexity = 20
deprecated-methods = False
utf8-header = True
clean-lines = True
prefer-single-quotes = False
string-formatting = False
imports = True
debug-statements = False
return-status-codes = False
[versions]
Sphinx = 1.1.3
zc.buildout = 1.6.3
zc.recipe.egg = 1.3.2
zope.pagetemplate = 3.6.3
plone.recipe.codeanalysis = 1.0b3

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1 +1,6 @@
from plone.api import content, user, group, portal, env # noQA
# -*- coding: utf-8 -*-
from plone.api import content # noQA
from plone.api import user # noQA
from plone.api import group # noQA
from plone.api import portal # noQA
from plone.api import env # noQA

View File

@ -1,4 +1,4 @@
<configure
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="plone.api">

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager