Use plone.recipe.codeanalysis
Integrate plone.recipe.codeanalysis in the buildout and correct the trivials errors.
This commit is contained in:
parent
e12a6c08b3
commit
7a75f794e5
1
Makefile
1
Makefile
|
@ -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 \
|
||||
|
|
16
buildout.cfg
16
buildout.cfg
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
|
||||
try:
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<configure
|
||||
<configure
|
||||
xmlns="http://namespaces.zope.org/zope"
|
||||
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
|
||||
i18n_domain="plone.api">
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from AccessControl.SecurityManagement import getSecurityManager
|
||||
from AccessControl.SecurityManagement import setSecurityManager
|
||||
from AccessControl.SecurityManagement import newSecurityManager
|
||||
|
|
Reference in New Issue