Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Commit a7cc8fa

Browse files
committed
Configure flake8 in setup.cfg
This allows editors to respect the project's config
1 parent 34303f8 commit a7cc8fa

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

runtests.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
'fast': ['tests', '-q'],
1313
}
1414

15-
FLAKE8_ARGS = ['rest_marshmallow', 'tests', '--ignore=E501']
16-
17-
1815
sys.path.append(os.path.dirname(__file__))
1916

2017

@@ -23,9 +20,9 @@ def exit_on_failure(ret, message=None):
2320
sys.exit(ret)
2421

2522

26-
def flake8_main(args):
23+
def flake8_main():
2724
print('Running flake8 code linting')
28-
ret = subprocess.call(['flake8'] + args)
25+
ret = subprocess.call('flake8')
2926
print('flake8 failed' if ret else 'flake8 passed')
3027
return ret
3128

@@ -88,4 +85,4 @@ def is_class(string):
8885
if run_tests:
8986
exit_on_failure(pytest.main(pytest_args))
9087
if run_flake8:
91-
exit_on_failure(flake8_main(FLAKE8_ARGS))
88+
exit_on_failure(flake8_main())

setup.cfg

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
[wheel]
1+
[bdist_wheel]
22
universal = 1
3+
4+
[flake8]
5+
ignore = E501
6+
exclude = .git,.ropeproject,.tox,docs,.git,build,setup.py,env,venv

0 commit comments

Comments
 (0)