mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-28 20:43:43 +03:00
4517e32224
* 🔧 Add pre-commit config Similar to graphene and graphene-sqlalchemy * ⬆ Bump black * 👷 Lint on CI * ⬆ Bump flake8-black * 🔧 Keep excluding migrations * ⬆ Bump flake8 * 🔧 Remove black and flake8 from tox config * ⬆ Update pre-commit versions * Upgrade syntax to python 3.7+ * Format with pre-commit dedent docs/schema.py to allow formatting * Fix tests on python 3.7
50 lines
990 B
INI
50 lines
990 B
INI
[aliases]
|
|
test=pytest
|
|
|
|
[bdist_wheel]
|
|
universal=1
|
|
|
|
[flake8]
|
|
exclude = docs,graphene_django/debug/sql/*
|
|
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]
|
|
omit = */tests/*
|
|
|
|
[isort]
|
|
known_first_party=graphene,graphene_django
|
|
multi_line_output=3
|
|
include_trailing_comma=True
|
|
force_grid_wrap=0
|
|
use_parentheses=True
|
|
line_length=88
|
|
|
|
[tool:pytest]
|
|
DJANGO_SETTINGS_MODULE = examples.django_test_settings
|
|
addopts = --random-order
|