Skip to content

Commit a88e4af

Browse files
committed
Start adding ruff config
We still have a lot of failures, but given that we aren't adding a CI check that seems fine.
1 parent 04260bf commit a88e4af

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,33 @@ test = [
3939
"pytest-httpserver>=1.0.10",
4040
]
4141

42+
[tool.ruff.lint]
43+
select = ["ALL"]
44+
ignore = [
45+
# Skip type annotation on **_
46+
"ANN003",
47+
48+
# documenting magic methods
49+
"D105",
50+
51+
# Line length. We let black handle this for now.
52+
"E501",
53+
54+
# Don't bother with future imports for type annotations
55+
"FA100",
56+
57+
# Magic numbers for HTTP status codes seem ok most of the time.
58+
"PLR2004",
59+
60+
# pytest rules
61+
"PT009",
62+
"PT027",
63+
]
64+
65+
[tool.ruff.lint.per-file-ignores]
66+
"geoip2/{models,records}.py" = [ "D107", "PLR0913" ]
67+
"tests/*" = ["ANN201", "D"]
68+
4269
[tool.setuptools.package-data]
4370
geoip2 = ["py.typed"]
4471

0 commit comments

Comments
 (0)