Files
cibuildwheel/pyproject.toml
T

165 lines
4.2 KiB
TOML
Raw Normal View History

2020-12-23 16:31:42 -05:00
[build-system]
requires = [
"setuptools>=42",
]
build-backend = "setuptools.build_meta"
2021-06-12 11:40:33 -04:00
[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311']
2021-06-12 11:40:33 -04:00
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
2021-06-12 11:40:33 -04:00
junit_family = "xunit2"
xfail_strict = true
filterwarnings = ["error"]
log_cli_level = "info"
2021-06-12 11:40:33 -04:00
[tool.mypy]
python_version = 3.8
2021-06-12 11:40:33 -04:00
files = [
"cibuildwheel/*.py",
"test/**/*.py",
"unit_test/**/*.py",
"bin/*.py",
"noxfile.py",
2021-06-12 11:40:33 -04:00
]
warn_unused_configs = true
show_error_codes = true
2021-06-12 11:40:33 -04:00
warn_redundant_casts = true
no_implicit_reexport = true
strict_equality = true
2021-06-12 14:02:06 -04:00
warn_unused_ignores = true
check_untyped_defs = true
disallow_subclassing_any = true
disallow_any_generics = true
warn_return_any = true
no_implicit_optional = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
2021-06-12 14:02:06 -04:00
[[tool.mypy.overrides]]
module = "cibuildwheel.*"
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
2021-06-12 11:40:33 -04:00
[[tool.mypy.overrides]]
module = [
"setuptools",
"pytest", # ignored in pre-commit to speed up check
"bashlex",
"bashlex.*",
2021-06-12 11:40:33 -04:00
"importlib_resources",
]
ignore_missing_imports = true
2021-10-26 12:06:09 -04:00
[tool.check-manifest]
ignore = [
".*",
".circleci/**",
"test/**",
"unit_test/**",
"docs/**",
"examples/**",
"bin/**",
"*.yml",
"CI.md", # TODO: can change test/test_ssl and remove this
"requirements-dev.txt",
"noxfile.py",
]
[tool.pylint]
py-version = "3.8"
2023-04-18 06:06:18 -07:00
jobs = "0"
fail-on = ["E", "F"]
fail-under = "9.8"
reports.output-format = "colorized"
messages_control.enable = [
"useless-suppression",
]
messages_control.disable = [
"abstract-class-instantiated", # filelock triggers this
"duplicate-code",
"fixme",
"invalid-name",
"line-too-long",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"no-else-break",
"no-else-return",
"protected-access",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-nested-blocks",
"too-many-return-statements",
"too-many-statements",
"unsubscriptable-object",
"wrong-import-position",
2023-01-30 15:53:44 -05:00
"unused-argument", # Handled by Ruff
"broad-exception-raised", # Could be improved eventually
]
2023-01-30 15:53:44 -05:00
[tool.ruff]
select = [
2023-04-18 12:00:35 -04:00
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
2023-04-18 12:01:08 -04:00
"G", # flake8-logging-format
2023-04-18 12:00:35 -04:00
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
2023-04-18 12:38:21 -04:00
"TID251", # flake8-tidy-imports.banned-api
2023-04-18 12:00:35 -04:00
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
2023-01-30 15:53:44 -05:00
]
2023-02-07 10:23:18 -05:00
extend-ignore = [
2023-04-18 12:00:35 -04:00
"PLR", # Design related pylint codes
"E501", # Line too long
2023-01-30 15:53:44 -05:00
"RET504", "RET505", "RET508", # else after control flow
"PT004", # Rename suggested for returnless fixtures
"PT007", # False positive (fixed upstream)
]
2023-06-17 15:04:01 -04:00
target-version = "py38"
2023-04-18 22:02:47 -04:00
typing-modules = ["cibuildwheel._compat.typing"]
2023-01-30 15:53:44 -05:00
flake8-unused-arguments.ignore-variadic-names = true
2023-04-18 12:38:21 -04:00
[tool.ruff.flake8-tidy-imports.banned-api]
"typing.Mapping".msg = "Use collections.abc.Mapping instead."
"typing.Callable".msg = "Use collections.abc.Callable instead."
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
"typing.Set".msg = "Use collections.abc.Set instead."
2023-04-18 22:02:47 -04:00
"typing.NotRequired".msg = "Use cibuildwheel._compat.typing.NotRequired instead."
2023-04-18 23:29:54 -04:00
"typing.assert_never".msg = "Use cibuildwheel._compat.typing.assert_never instead."
"tomllib".msg = "Use cibuildwheel._compat.tomllib instead."
"tomli".msg = "Use cibuildwheel._compat.tomllib instead."
[tool.ruff.per-file-ignores]
"unit_test/*" = ["PLC1901"]
2023-09-13 16:09:21 -04:00
"cibuildwheel/_compat/**.py" = ["TID251"]