File: pyproject.toml

package info (click to toggle)
python-hypothesis 6.151.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,424 kB
  • sloc: python: 64,702; sh: 244; makefile: 35; javascript: 6
file content (135 lines) | stat: -rw-r--r-- 4,465 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[tool.ruff]
line-length = 88
target-version = "py310"

[tool.ruff.per-file-target-version]
"test_typealias_py312.py" = "py312"

[tool.ruff.lint]
select = [
    "ASYNC",  # flake8-async
    "B",      # flake8-bugbear
    "C4",     # flake8-comprehensions
    "COM",    # flake8-commas
    "DJ",     # flake8-django
    "E",      # pycodestyle
    "F",      # Pyflakes
    "FBT",    # flake8-boolean-trap
    "FLY",    # flynt
    "G",      # flake8-logging-format
    "INT",    # flake8-gettext
    "ISC",    # flake8-implicit-str-concat
    "NPY",    # NumPy-specific rules
    "PD",     # pandas-vet
    "PIE",    # flake8-pie
    "PLE",    # Pylint errors
    "PT",     # flake8-pytest-style
    "RET504", # flake8-return
    "RSE",    # flake8-raise
    "SIM",    # flake8-simplify
    "T10",    # flake8-debugger
    "TID",    # flake8-tidy-imports
    "UP",     # pyupgrade
    "W",      # pycodestyle
    "YTT",    # flake8-2020
    "RUF",    # Ruff-specific rules
]
ignore = [
    "B008",
    "B018",
    "C408",
    "C420",
    "COM812",
    "DJ007",
    "DJ008",
    # "line too long". ruff uses tool.ruff.line-length both for this rule, and for `ruff format`.
    # We want ruff format to match black's 88 line length, so we set tool.ruff.line-length = 88. But
    # this is a formatter suggestion, not a rule, so we also disable the E501 lint.
    "E501",
    "E721",
    "E731",
    "E741",
    "FBT001",
    "FBT003",
    "PD011",
    "PIE790",  # See https://github.com/astral-sh/ruff/issues/10538
    "PT001",
    "PT003",
    "PT006",
    "PT007",
    "PT009",
    "PT011",
    "PT012",
    "PT013",
    "PT015",
    "PT017",
    "PT019",
    "PT023",
    "PT027",
    "PT031",
    "RUF001",  # don't break our tests by rewriting confusables
    "RUF005",
    "RUF017",
    "RUF028",  # we use fmt: off for black as well as ruff, with differing semantics
    "SIM102",
    "SIM105",
    "SIM108",
    "SIM114",
    "SIM300",
    "SIM905",
    "UP031",
    "UP037",
]

[tool.ruff.lint.per-file-ignores]
"hypothesis-python/src/hypothesis/core.py" = ["B030", "B904"]
"hypothesis-python/src/hypothesis/internal/compat.py" = ["F401"]
"hypothesis-python/tests/nocover/test_imports.py" = ["F403", "F405"]
"hypothesis-python/tests/numpy/test_randomness.py" = ["NPY002"]
"hypothesis-python/src/hypothesis/internal/conjecture/*" = ["B023"]
"hypothesis-python/tests/conjecture/test_data_tree.py" = ["B023"]

[tool.mypy]
python_version = "3.14"
platform = "linux"

allow_redefinition = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
no_implicit_optional = true
no_implicit_reexport = true

follow_imports = "silent"
ignore_missing_imports = true

strict_equality = true
warn_no_return = true
warn_unused_ignores = true
warn_unused_configs = true
warn_redundant_casts = true

disable_error_code = "annotation-unchecked"

# pytest 9 added support for [tool.pytest], which we should move to when pytest 9
# is the oldest one we support.
[tool.pytest.ini_options]
# -rfEX :: Print a summary of failures, errors, and xpasses (xfails that pass).
addopts = "-rfEX --strict-markers --tb=native -p pytester -p no:legacypath --runpytest=subprocess --durations=20 --durations-min=1.0"
xfail_strict = true
filterwarnings = [
    "error",
    # https://github.com/pandas-dev/pandas/issues/41199
    "default:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning",
    "default:distutils Version classes are deprecated\\. Use packaging\\.version instead:DeprecationWarning",
    # https://github.com/pandas-dev/pandas/issues/32056 (?)
    "default:numpy\\.ufunc size changed, may indicate binary incompatibility\\. Expected 216 from C header, got 232 from PyObject:RuntimeWarning",
    # https://github.com/pandas-dev/pandas/issues/34848
    "default:`np\\.bool` is a deprecated alias for the builtin `bool`:DeprecationWarning",
    "default:`np\\.complex` is a deprecated alias for the builtin `complex`:DeprecationWarning",
    "default:`np\\.object` is a deprecated alias for the builtin `object`:DeprecationWarning",
    # pytest-cov can't see into subprocesses; we'll see <100% covered if this is an issue
    "ignore:Module hypothesis.* was previously imported, but not measured",
    "ignore:CrosshairPrimitiveProvider.realize does not have the for_failure parameter",
    # Redis
    "default:Call to '__init__' function with deprecated usage of input argument/s 'retry_on_timeout'",
]