mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-12-02 06:23:46 +03:00
Introduce pre-commit config for flake8 (#1338)
This commit is contained in:
parent
ed4ee98596
commit
12ec3ca4ac
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install tox
|
pip install tox
|
||||||
- name: Run lint 💅
|
- name: Run pre-commit 💅
|
||||||
run: tox
|
run: tox
|
||||||
env:
|
env:
|
||||||
TOXENV: flake8
|
TOXENV: pre-commit
|
||||||
|
|
8
.pre-commit-config.yaml
Normal file
8
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
default_language_version:
|
||||||
|
python: python3.8
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 5.0.4
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
additional_dependencies: [flake8-bugbear==22.7.1]
|
6
setup.py
6
setup.py
|
@ -27,9 +27,9 @@ tests_require = [
|
||||||
|
|
||||||
dev_requires = [
|
dev_requires = [
|
||||||
"black==19.10b0",
|
"black==19.10b0",
|
||||||
"flake8==3.7.9",
|
"flake8>=5,<6",
|
||||||
"flake8-black==0.1.1",
|
"flake8-black==0.3.3",
|
||||||
"flake8-bugbear==20.1.4",
|
"flake8-bugbear==22.7.1",
|
||||||
] + tests_require
|
] + tests_require
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
8
tox.ini
8
tox.ini
|
@ -45,8 +45,8 @@ deps = -e.[dev]
|
||||||
commands =
|
commands =
|
||||||
black --exclude "/migrations/" graphene_django examples setup.py --check
|
black --exclude "/migrations/" graphene_django examples setup.py --check
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:pre-commit]
|
||||||
basepython = python3.8
|
skip_install = true
|
||||||
deps = -e.[dev]
|
deps = pre-commit
|
||||||
commands =
|
commands =
|
||||||
flake8 graphene_django examples setup.py
|
pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
Loading…
Reference in New Issue
Block a user