mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-18 20:22:21 +03:00
Add new flake8 plugins and update errors to look for
This commit is contained in:
parent
b92b7b05a3
commit
f9ce7dd99d
27
setup.cfg
27
setup.cfg
|
@ -5,8 +5,33 @@ test=pytest
|
||||||
universal=1
|
universal=1
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = setup.py,docs/*,examples/*,tests,graphene_django/debug/sql/*
|
exclude = docs,graphene_django/debug/sql/*,migrations
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
|
select =
|
||||||
|
# Dictionary key repeated
|
||||||
|
F601,
|
||||||
|
# Ensure use of ==/!= to compare with str, bytes and int literals
|
||||||
|
F632,
|
||||||
|
# Redefinition of unused name
|
||||||
|
F811,
|
||||||
|
# Using an undefined variable
|
||||||
|
F821,
|
||||||
|
# Defining an undefined variable in __all__
|
||||||
|
F822,
|
||||||
|
# Using a variable before it is assigned
|
||||||
|
F823,
|
||||||
|
# Duplicate argument in function declaration
|
||||||
|
F831,
|
||||||
|
# Black would format this line
|
||||||
|
BLK,
|
||||||
|
# Do not use bare except
|
||||||
|
B001,
|
||||||
|
# Don't allow ++n. You probably meant n += 1
|
||||||
|
B002,
|
||||||
|
# Do not use mutable structures for argument defaults
|
||||||
|
B006,
|
||||||
|
# Do not perform calls in argument defaults
|
||||||
|
B008
|
||||||
|
|
||||||
[coverage:run]
|
[coverage:run]
|
||||||
omit = */tests/*
|
omit = */tests/*
|
||||||
|
|
7
setup.py
7
setup.py
|
@ -25,7 +25,12 @@ tests_require = [
|
||||||
] + rest_framework_require
|
] + rest_framework_require
|
||||||
|
|
||||||
|
|
||||||
dev_requires = ["black==19.3b0", "flake8==3.7.7"] + tests_require
|
dev_requires = [
|
||||||
|
"black==19.3b0",
|
||||||
|
"flake8==3.7.7",
|
||||||
|
"flake8-black==0.1.0",
|
||||||
|
"flake8-bugbear==19.3.0",
|
||||||
|
] + tests_require
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="graphene-django",
|
name="graphene-django",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user