Skip to content

Commit

Permalink
Merge pull request #397 from plone/flake8-config
Browse files Browse the repository at this point in the history
Add Flake8 config with check for bracket indentation.
  • Loading branch information
tisto committed Sep 5, 2017
2 parents 89e7786 + 37f1372 commit 5c34f4d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ flake8-extensions =
flake8-coding
flake8-debugger
flake8-print

# additional pep8/flake8 rules, see docs for details
# https://pep8.readthedocs.io/en/1.4.6/intro.html#error-codes
# - E123: closing bracket does not match indentation of opening bracket’s line
flake8-select = E123

[dependencychecker]
recipe = zc.recipe.egg
Expand Down
2 changes: 1 addition & 1 deletion src/plone/restapi/services/content/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ def reply(self):
data['sharing'] = {
'@id': '{}/@sharing'.format(self.context.absolute_url()),
'title': 'Sharing',
}
}
return data
2 changes: 1 addition & 1 deletion src/plone/restapi/services/workflow/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __call__(self, expand=False):
result['workflow'].update({
'history': json_compatible(history),
'transitions': transitions,
})
})
return result


Expand Down
10 changes: 5 additions & 5 deletions src/plone/restapi/tests/test_tus.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_tus_post_initialization_with_metadata(self):
headers={'Tus-Resumable': '1.0.0',
'Upload-Length': str(UPLOAD_LENGTH),
'Upload-Metadata': metadata}
)
)
self.assertEqual(response.status_code, 201)
uid = self.get_tus_uid_from_url(response.headers['Location'])
upload = TUSUpload(uid)
Expand Down Expand Up @@ -300,7 +300,7 @@ def test_tus_can_upload_pdf_file(self):
headers={'Tus-Resumable': '1.0.0',
'Upload-Length': str(pdf_file_size),
'Upload-Metadata': metadata}
)
)
self.assertEqual(response.status_code, 201)
location = response.headers['Location']

Expand All @@ -327,7 +327,7 @@ def test_tus_can_upload_text_file(self):
headers={'Tus-Resumable': '1.0.0',
'Upload-Length': str(UPLOAD_LENGTH),
'Upload-Metadata': metadata}
)
)
self.assertEqual(response.status_code, 201)
location = response.headers['Location']

Expand Down Expand Up @@ -359,7 +359,7 @@ def test_tus_can_replace_pdf_file(self):
headers={'Tus-Resumable': '1.0.0',
'Upload-Length': str(pdf_file_size),
'Upload-Metadata': metadata}
)
)
self.assertEqual(response.status_code, 201)
location = response.headers['Location']

Expand Down Expand Up @@ -583,7 +583,7 @@ def test_tus_can_upload_pdf_file(self):
headers={'Tus-Resumable': '1.0.0',
'Upload-Length': str(pdf_file_size),
'Upload-Metadata': metadata}
)
)
self.assertEqual(response.status_code, 201)
location = response.headers['Location']

Expand Down
2 changes: 1 addition & 1 deletion versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ zc.recipe.egg = 2.0.3
# Code-analysis
plone.recipe.codeanalysis = 2.2
coverage = 3.7.1
flake8 = 2.4.0
flake8 = 2.5.0
flake8-coding = 1.2.2


Expand Down

0 comments on commit 5c34f4d

Please sign in to comment.