chore: update hooks and Ruff config (#4904)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2023-10-27 01:26:28 -04:00
committed by GitHub
parent 1e28599e41
commit 3aece819fd
4 changed files with 18 additions and 18 deletions

View File

@@ -19,7 +19,7 @@ ignore = [
[tool.mypy]
files = ["pybind11"]
python_version = "3.6"
python_version = "3.7"
strict = true
show_error_codes = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
@@ -57,10 +57,13 @@ messages_control.disable = [
"unused-argument", # covered by Ruff ARG
]
[tool.ruff]
select = [
"E", "F", "W", # flake8
target-version = "py37"
src = ["src"]
line-length = 120
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"N", # pep8-naming
@@ -86,13 +89,10 @@ ignore = [
"PT004", # Fixture that doesn't return needs underscore (no, it is fine)
"SIM118", # iter(x) is not always the same as iter(x.keys())
]
target-version = "py37"
src = ["src"]
unfixable = ["T20"]
exclude = []
line-length = 120
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]
[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["EM", "N", "E721"]
"tests/test_call_policies.py" = ["PLC1901"]