Skip to content

Commit

Permalink
Add a few flake8 extensions to code-analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto committed May 28, 2015
1 parent bfd4ebb commit 2121c6a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ mode = 755
recipe = plone.recipe.codeanalysis
directory = ${buildout:directory}/src
flake8-max-complexity = 15
flake8-extensions =
flake8-coding
flake8-debugger
flake8-print

[releaser]
recipe = zc.recipe.egg
Expand Down Expand Up @@ -79,4 +83,5 @@ zc.buildout = 2.3.1
zope.interface = 4.0.5
coverage = 3.7.1
flake8 = 2.3.0
plone.recipe.codeanalysis = 2.0b1

1 change: 1 addition & 0 deletions src/plone/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# -*- coding: utf-8 -*-
__import__('pkg_resources').declare_namespace(__name__)
1 change: 1 addition & 0 deletions src/plone/restapi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
1 change: 1 addition & 0 deletions src/plone/restapi/browser/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
1 change: 1 addition & 0 deletions src/plone/restapi/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
7 changes: 3 additions & 4 deletions src/plone/restapi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ def append_json_to_links(result):
if 'member' in result:
for index, item in enumerate(result['member']):
if '@id' in item:
result['member'][index]['@id'] = \
'{0}/@@json'.format(
result['member'][index]['@id']
)
result['member'][index]['@id'] = '{0}/@@json'.format(
result['member'][index]['@id']
)
if 'parent' in result and result != {} and '@id' in result['parent']:
result['parent']['@id'] = '{0}/@@json'.format(
result['parent']['@id']
Expand Down

0 comments on commit 2121c6a

Please sign in to comment.