mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-29 21:13:44 +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: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
- name: Run lint 💅
|
||||
- name: Run pre-commit 💅
|
||||
run: tox
|
||||
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 = [
|
||||
"black==19.10b0",
|
||||
"flake8==3.7.9",
|
||||
"flake8-black==0.1.1",
|
||||
"flake8-bugbear==20.1.4",
|
||||
"flake8>=5,<6",
|
||||
"flake8-black==0.3.3",
|
||||
"flake8-bugbear==22.7.1",
|
||||
] + tests_require
|
||||
|
||||
setup(
|
||||
|
|
8
tox.ini
8
tox.ini
|
@ -45,8 +45,8 @@ deps = -e.[dev]
|
|||
commands =
|
||||
black --exclude "/migrations/" graphene_django examples setup.py --check
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python3.8
|
||||
deps = -e.[dev]
|
||||
[testenv:pre-commit]
|
||||
skip_install = true
|
||||
deps = pre-commit
|
||||
commands =
|
||||
flake8 graphene_django examples setup.py
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
|
|
Loading…
Reference in New Issue
Block a user