Skip to content

Commit a830c09

Browse files
committed
chore: Update pre-commit
1 parent f4dd109 commit a830c09

File tree

9 files changed

+48
-113
lines changed

9 files changed

+48
-113
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ on:
55
paths:
66
- '**.py'
77
- '.github/workflows/*.yml'
8-
- '.pylintrc'
98
- '.pre-commit-config.yaml'
10-
- '.pydocstyle'
11-
- '.relint.yml'
129
- '.yamllint'
1310
- 'pyproject.toml'
1411
- 'tox.ini'
@@ -31,22 +28,7 @@ jobs:
3128
python-version: 3.7
3229

3330
- run: pip install pre-commit
34-
- run: SKIP=pylint,mypy pre-commit run --all-files
35-
36-
pylint:
37-
name: Pylint
38-
runs-on: ubuntu-20.04
39-
steps:
40-
- uses: actions/checkout@v3.0.2
41-
with:
42-
fetch-depth: 1
43-
44-
- uses: actions/setup-python@v3
45-
with:
46-
python-version: 3.7
47-
48-
- run: pip install pre-commit
49-
- run: pre-commit run pylint --all-files
31+
- run: SKIP=mypy pre-commit run --all-files
5032

5133
mypy:
5234
name: Mypy

.pre-commit-config.yaml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.2.0
6+
rev: v4.4.0
77
hooks:
88
- id: check-yaml
99
- id: end-of-file-fixer
@@ -15,36 +15,31 @@ repos:
1515
- id: check-merge-conflict
1616

1717
- repo: https://github.com/jorisroovers/gitlint
18-
rev: v0.17.0
18+
rev: v0.19.1
1919
hooks:
2020
- id: gitlint
2121

2222
- repo: https://github.com/adrienverge/yamllint
23-
rev: v1.26.3
23+
rev: v1.30.0
2424
hooks:
2525
- id: yamllint
2626

27-
- repo: https://github.com/PyCQA/pydocstyle
28-
rev: 6.1.1
29-
hooks:
30-
- id: pydocstyle
31-
32-
- repo: https://github.com/codingjoe/relint
33-
rev: 1.2.1
34-
hooks:
35-
- id: relint
36-
3727
- repo: https://github.com/ambv/black
38-
rev: 22.3.0
28+
rev: 23.3.0
3929
hooks:
4030
- id: black
4131
types: [python]
4232

4333
- repo: https://github.com/asottile/blacken-docs
44-
rev: v1.12.1
34+
rev: 1.13.0
4535
hooks:
4636
- id: blacken-docs
47-
additional_dependencies: [ black==22.3.0 ]
37+
additional_dependencies: [ black==23.3.0 ]
38+
39+
- repo: https://github.com/charliermarsh/ruff-pre-commit
40+
rev: "v0.0.261"
41+
hooks:
42+
- id: ruff
4843

4944
- repo: https://github.com/asottile/seed-isort-config
5045
rev: v2.2.0
@@ -58,23 +53,14 @@ repos:
5853
additional_dependencies: ["isort[pyproject]"]
5954

6055
- repo: https://github.com/pre-commit/mirrors-mypy
61-
rev: v0.942
56+
rev: v1.2.0
6257
hooks:
6358
- id: mypy
6459
exclude: ^(docs/|test/).*$
6560
args: ["--ignore-missing-imports"]
6661

67-
- repo: https://github.com/pre-commit/mirrors-pylint
68-
rev: v3.0.0a4
69-
hooks:
70-
- id: pylint
71-
additional_dependencies: ["isort[pyproject]"]
72-
exclude: ^(docs/|test/).*$
73-
# disabled import-error as may be run out of environment with deps
74-
args: ["--disable=import-error"]
75-
7662
- repo: https://github.com/myint/rstcheck
77-
rev: v5.0.0
63+
rev: v6.1.2
7864
hooks:
7965
- id: rstcheck
8066
additional_dependencies:

.pydocstyle

Lines changed: 0 additions & 5 deletions
This file was deleted.

.pylintrc

Lines changed: 0 additions & 33 deletions
This file was deleted.

.relint.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,34 @@ exclude_lines = [
8181
"if TYPE_CHECKING:",
8282
"pass"
8383
]
84+
85+
[tool.ruff]
86+
select = [
87+
"E", # pycodestyle errors
88+
"W", # pycodestyle warnings
89+
"F", # pyflakes
90+
"C", # flake8-comprehensions
91+
"B", # flake8-bugbear
92+
"D", # pydocstyle
93+
]
94+
ignore = [
95+
"E501", # Line too long, handled by black
96+
"B008", # Do not perform function calls in argument defaults
97+
"C901", # Too complex
98+
"D100", # Missing docstring in public module
99+
"D101", # Missing docstring in public class
100+
"D102", # Missing docstring in public method
101+
"D103", # Missing docstring in public function
102+
"D104", # Missing docstring in public package
103+
"D105", # Missing docstring in magic method
104+
"D107", # Missing docstring in `__init__`
105+
"D203", # One blank line before class
106+
"D213", # Multiline summary second line
107+
"D401", # Imperative mood
108+
]
109+
target-version = "py37"
110+
111+
# Ignore `F401` (unused import) in all `__init__.py` files.
112+
[tool.ruff.per-file-ignores]
113+
"__init__.py" = ["F401"]
114+
"strategies.py" = ["F401"]

src/hypothesis_graphql/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
from ._strategies.validation import validate_scalar_strategy
2-
from .strategies import from_schema, mutations, queries
1+
from ._strategies.validation import validate_scalar_strategy # noqa: F401
2+
from .strategies import from_schema, mutations, queries # noqa: F401
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# pylint: disable=unused-import
2-
from ._strategies.strategy import from_schema, mutations, queries
1+
from ._strategies.strategy import from_schema, mutations, queries # noqa: F401
32

43
# Backward compatibility
54
query = queries

test/fetch_corpus.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def update_corpus(futures: List[Future], corpus_path: str = CORPUS_PATH) -> Dict
8989

9090

9191
def main(directory_url: str = API_DIRECTORY_URL, corpus_path: str = CORPUS_PATH):
92-
9392
with concurrent.futures.ThreadPoolExecutor() as executor:
9493
futures = []
9594

0 commit comments

Comments
 (0)