Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: flake8-abp/setup.py

Issue 29349889: Issue 4341 - Make flake8-abp compatible with flake8 3.0 (Closed)
Patch Set: Created Aug. 17, 2016, 10:26 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | flake8-abp/tox.ini » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: flake8-abp/setup.py
===================================================================
--- a/flake8-abp/setup.py
+++ b/flake8-abp/setup.py
@@ -80,11 +80,14 @@
pass
def run(self):
- import flake8.engine
+ try:
+ import flake8.engine as api
+ except ImportError:
+ import flake8.api.legacy as api
directory = os.path.dirname(__file__)
filenames = glob.glob(os.path.join(directory, 'tests', '*.py'))
- style_guide = flake8.engine.get_style_guide()
+ style_guide = api.get_style_guide()
failed = False
for filename in sorted(filenames):
@@ -117,10 +120,10 @@
py_modules=['flake8_abp'],
entry_points={
'flake8.extension': [
- 'AXXX = flake8_abp:ASTChecker',
- 'A109-A110 = flake8_abp:check_quotes',
- 'A111 = flake8_abp:check_redundant_parenthesis',
- 'A303 = flake8_abp:check_non_default_encoding',
+ 'A = flake8_abp:ASTChecker',
+ 'A1 = flake8_abp:check_quotes',
+ 'A111 = flake8_abp:check_redundant_parenthesis',
+ 'A303 = flake8_abp:check_non_default_encoding',
],
},
cmdclass={'test': TestCommand}
« no previous file with comments | « no previous file | flake8-abp/tox.ini » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld