Skip to content

Commit 6445424

Browse files
committed
chore: update pre-commit
Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com>
1 parent 34b7556 commit 6445424

File tree

4 files changed

+50
-63
lines changed

4 files changed

+50
-63
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 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.5.0
6+
rev: v4.6.0
77
hooks:
88
- id: check-yaml
99
- id: end-of-file-fixer
@@ -20,23 +20,23 @@ repos:
2020
- id: gitlint
2121

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

2727
- repo: https://github.com/pre-commit/mirrors-mypy
28-
rev: v1.7.1
28+
rev: v1.11.1
2929
hooks:
3030
- id: mypy
3131
exclude: ^(docs/|test/).*$
3232
args: ["--ignore-missing-imports"]
3333

3434
- repo: https://github.com/astral-sh/ruff-pre-commit
35-
rev: v0.1.6
35+
rev: v0.5.6
3636
hooks:
3737
- id: ruff-format
3838

3939
- repo: https://github.com/astral-sh/ruff-pre-commit
40-
rev: v0.1.6
40+
rev: v0.5.6
4141
hooks:
4242
- id: ruff

pyproject.toml

Lines changed: 43 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,32 @@ version = "0.11.0"
88
description = "Hypothesis strategies for GraphQL queries"
99
keywords = ["hypothesis", "graphql", "testing"]
1010
classifiers = [
11-
"Development Status :: 4 - Beta",
12-
"Environment :: Console",
13-
"Framework :: Hypothesis",
14-
"Intended Audience :: Developers",
15-
"License :: OSI Approved :: MIT License",
16-
"Operating System :: OS Independent",
17-
"Programming Language :: Python :: 3 :: Only",
18-
"Programming Language :: Python :: 3.8",
19-
"Programming Language :: Python :: 3.9",
20-
"Programming Language :: Python :: 3.10",
21-
"Programming Language :: Python :: 3.11",
22-
"Programming Language :: Python :: 3.12",
23-
"Programming Language :: Python :: Implementation :: CPython",
24-
"Topic :: Software Development :: Testing",
11+
"Development Status :: 4 - Beta",
12+
"Environment :: Console",
13+
"Framework :: Hypothesis",
14+
"Intended Audience :: Developers",
15+
"License :: OSI Approved :: MIT License",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python :: 3 :: Only",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: Implementation :: CPython",
24+
"Topic :: Software Development :: Testing",
2525
]
2626
authors = [{ name = "Dmitry Dygalo", email = "dmitry@dygalo.dev" }]
2727
maintainers = [{ name = "Dmitry Dygalo", email = "dmitry@dygalo.dev" }]
2828
readme = "README.md"
2929
license = "MIT"
3030
include = ["src/hypothesis_graphql/py.typed"]
3131
requires-python = ">=3.8"
32-
dependencies = [
33-
"hypothesis>=6.84.3,<7.0",
34-
"graphql-core>=3.1.0,<3.3.0",
35-
]
32+
dependencies = ["hypothesis>=6.84.3,<7.0", "graphql-core>=3.1.0,<3.3.0"]
3633

3734
[project.optional-dependencies]
38-
tests = [
39-
"coverage>=7",
40-
"pytest>=6.2.0,<8",
41-
"pytest-xdist>=2.5,<3.0",
42-
]
43-
cov = [
44-
"coverage-enable-subprocess",
45-
"coverage[toml]>=7",
46-
]
35+
tests = ["coverage>=7", "pytest>=6.2.0,<8", "pytest-xdist>=2.5,<3.0"]
36+
cov = ["coverage-enable-subprocess", "coverage[toml]>=7"]
4737
dev = ["hypothesis_graphql[tests,cov]"]
4838

4939
[project.urls]
@@ -53,10 +43,7 @@ Funding = "https://github.com/sponsors/Stranger6667"
5343
"Source Code" = "https://github.com/Stranger6667/hypothesis-graphql"
5444

5545
[tool.hatch.build.targets.sdist]
56-
include = [
57-
"/src",
58-
"/test",
59-
]
46+
include = ["/src", "/test"]
6047

6148
[tool.coverage.run]
6249
parallel = true
@@ -70,47 +57,45 @@ source = ["src", ".tox/*/site-packages"]
7057
show_missing = true
7158
skip_covered = true
7259
precision = 2
73-
exclude_lines = [
74-
"raise NotImplementedError",
75-
"if TYPE_CHECKING:",
76-
"pass"
77-
]
60+
exclude_lines = ["raise NotImplementedError", "if TYPE_CHECKING:", "pass"]
7861

7962
[tool.ruff]
8063
line-length = 120
64+
target-version = "py38"
65+
66+
[tool.ruff.lint]
8167
select = [
82-
"E", # pycodestyle errors
83-
"W", # pycodestyle warnings
84-
"F", # pyflakes
85-
"C", # flake8-comprehensions
86-
"B", # flake8-bugbear
87-
"D", # pydocstyle
68+
"E", # pycodestyle errors
69+
"W", # pycodestyle warnings
70+
"F", # pyflakes
71+
"C", # flake8-comprehensions
72+
"B", # flake8-bugbear
73+
"D", # pydocstyle
8874
]
8975
ignore = [
90-
"E501", # Line too long
91-
"B008", # Do not perform function calls in argument defaults
92-
"C901", # Too complex
93-
"D100", # Missing docstring in public module
94-
"D101", # Missing docstring in public class
95-
"D102", # Missing docstring in public method
96-
"D103", # Missing docstring in public function
97-
"D104", # Missing docstring in public package
98-
"D105", # Missing docstring in magic method
99-
"D107", # Missing docstring in `__init__`
100-
"D203", # One blank line before class
101-
"D213", # Multiline summary second line
102-
"D401", # Imperative mood
76+
"E501", # Line too long
77+
"B008", # Do not perform function calls in argument defaults
78+
"C901", # Too complex
79+
"D100", # Missing docstring in public module
80+
"D101", # Missing docstring in public class
81+
"D102", # Missing docstring in public method
82+
"D103", # Missing docstring in public function
83+
"D104", # Missing docstring in public package
84+
"D105", # Missing docstring in magic method
85+
"D107", # Missing docstring in `__init__`
86+
"D203", # One blank line before class
87+
"D213", # Multiline summary second line
88+
"D401", # Imperative mood
10389
]
104-
target-version = "py38"
10590

10691
# Ignore `F401` (unused import) in all `__init__.py` files.
107-
[tool.ruff.per-file-ignores]
92+
[tool.ruff.lint.per-file-ignores]
10893
"__init__.py" = ["F401"]
10994
"strategies.py" = ["F401"]
11095

11196
[tool.ruff.format]
11297
skip-magic-trailing-comma = false
11398

114-
[tool.ruff.isort]
99+
[tool.ruff.lint.isort]
115100
known-first-party = ["hypothesis_graphql"]
116101
known-third-party = ["graphql", "hypothesis", "pytest"]

src/hypothesis_graphql/_strategies/factories.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
Most of them exist to avoid using lambdas, which might become expensive in Hypothesis in some cases.
44
"""
5+
56
from functools import lru_cache
67
from typing import Callable, List, Optional, Tuple
78

src/hypothesis_graphql/_strategies/primitives.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Strategies for simple types like scalars or enums."""
2+
23
from functools import lru_cache
34
from typing import Optional, Tuple, Type, TypeVar, Union
45

0 commit comments

Comments
 (0)