mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
f33f6afb66
* chore(deps): update pre-commit hooks updates: - [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v18.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.6...v18.1.2) - [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.3.5) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0) - [github.com/Lucas-C/pre-commit-hooks: v1.5.4 → v1.5.5](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.4...v1.5.5) - [github.com/sirosen/texthooks: 0.6.4 → 0.6.6](https://github.com/sirosen/texthooks/compare/0.6.4...0.6.6) - [github.com/shellcheck-py/shellcheck-py: v0.9.0.6 → v0.10.0.1](https://github.com/shellcheck-py/shellcheck-py/compare/v0.9.0.6...v0.10.0.1) - [github.com/PyCQA/pylint: v3.0.3 → v3.1.0](https://github.com/PyCQA/pylint/compare/v3.0.3...v3.1.0) - [github.com/python-jsonschema/check-jsonschema: 0.28.0 → 0.28.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.0...0.28.1) * style: pre-commit fixes * fix(types): correction for better typing Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
96 lines
2.2 KiB
TOML
96 lines
2.2 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=42", "cmake>=3.18", "ninja"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
[tool.check-manifest]
|
|
ignore = [
|
|
"tests/**",
|
|
"docs/**",
|
|
"tools/**",
|
|
"include/**",
|
|
".*",
|
|
"pybind11/include/**",
|
|
"pybind11/share/**",
|
|
"CMakeLists.txt",
|
|
"noxfile.py",
|
|
]
|
|
|
|
|
|
[tool.mypy]
|
|
files = ["pybind11"]
|
|
python_version = "3.8"
|
|
strict = true
|
|
show_error_codes = true
|
|
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
|
|
warn_unreachable = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["ghapi.*"]
|
|
ignore_missing_imports = true
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "6.0"
|
|
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
|
|
xfail_strict = true
|
|
filterwarnings = ["error"]
|
|
log_cli_level = "info"
|
|
testpaths = [
|
|
"tests",
|
|
]
|
|
timeout=300
|
|
|
|
|
|
[tool.pylint]
|
|
master.py-version = "3.6"
|
|
reports.output-format = "colorized"
|
|
messages_control.disable = [
|
|
"design",
|
|
"fixme",
|
|
"imports",
|
|
"line-too-long",
|
|
"imports",
|
|
"invalid-name",
|
|
"protected-access",
|
|
"missing-module-docstring",
|
|
"unused-argument", # covered by Ruff ARG
|
|
]
|
|
|
|
[tool.ruff]
|
|
target-version = "py37"
|
|
src = ["src"]
|
|
|
|
[tool.ruff.lint]
|
|
extend-select = [
|
|
"B", # flake8-bugbear
|
|
"I", # isort
|
|
"N", # pep8-naming
|
|
"ARG", # flake8-unused-arguments
|
|
"C4", # flake8-comprehensions
|
|
"EM", # flake8-errmsg
|
|
"ICN", # flake8-import-conventions
|
|
"PGH", # pygrep-hooks
|
|
"PIE", # flake8-pie
|
|
"PL", # pylint
|
|
"PT", # flake8-pytest-style
|
|
"RET", # flake8-return
|
|
"RUF100", # Ruff-specific
|
|
"SIM", # flake8-simplify
|
|
"UP", # pyupgrade
|
|
"YTT", # flake8-2020
|
|
]
|
|
ignore = [
|
|
"PLR", # Design related pylint
|
|
"E501", # Line too long (Black is enough)
|
|
"PT011", # Too broad with raises in pytest
|
|
"PT004", # Fixture that doesn't return needs underscore (no, it is fine)
|
|
"SIM118", # iter(x) is not always the same as iter(x.keys())
|
|
]
|
|
unfixable = ["T20"]
|
|
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/**" = ["EM", "N", "E721"]
|
|
"tests/test_call_policies.py" = ["PLC1901"]
|