@@ -18,7 +18,7 @@ license.file = "LICENSE"
1818maintainers = [
1919 { name = " Bernát Gábor" , email = " gaborjbernat@gmail.com" },
2020]
21- requires-python = " >=3.10 "
21+ requires-python = " >=3.8 "
2222classifiers = [
2323 " Development Status :: 5 - Production/Stable" ,
2424 " Intended Audience :: Developers" ,
@@ -27,6 +27,8 @@ classifiers = [
2727 " Operating System :: Microsoft :: Windows" ,
2828 " Operating System :: POSIX" ,
2929 " Programming Language :: Python :: 3 :: Only" ,
30+ " Programming Language :: Python :: 3.8" ,
31+ " Programming Language :: Python :: 3.9" ,
3032 " Programming Language :: Python :: 3.10" ,
3133 " Programming Language :: Python :: 3.11" ,
3234 " Programming Language :: Python :: 3.12" ,
@@ -40,8 +42,8 @@ dynamic = [
4042 " version" ,
4143]
4244dependencies = [
43- " filelock>=3.24.2 " ,
44- " platformdirs<5,>=4.9.2 " ,
45+ " filelock>=3.15.4 " ,
46+ " platformdirs<5,>=4.3.6 " ,
4547]
4648optional-dependencies.docs = [
4749 " furo>=2025.12.19" ,
@@ -51,10 +53,10 @@ optional-dependencies.docs = [
5153]
5254optional-dependencies.testing = [
5355 " covdefaults>=2.3" ,
54- " coverage>=7.13 .4" ,
55- " pytest>=9.0.2 " ,
56- " pytest-mock>=3.15.1 " ,
57- " setuptools>=82 " ,
56+ " coverage>=7.5 .4" ,
57+ " pytest>=8.3.5 " ,
58+ " pytest-mock>=3.14 " ,
59+ " setuptools>=75.1 " ,
5860]
5961urls.Changelog = " https://github.com/tox-dev/py-discovery/releases"
6062urls.Documentation = " https://py-discovery.readthedocs.io"
@@ -74,51 +76,40 @@ lint.select = [
7476 " ALL" ,
7577]
7678lint.ignore = [
77- " ANN001" , # Missing type annotation for function argument
78- " ANN002" , # Missing type annotation for *args
79- " ANN202" , # Missing return type annotation for private function
80- " ANN204" , # Missing return type annotation for special method
81- " ANN205" , # Missing return type annotation for staticmethod
82- " ANN206" , # Missing return type annotation for classmethod
83- " ANN401" , # Dynamically typed expressions (typing.Any)
84- " ARG001" , # Unused function argument
85- " ARG005" , # Unused lambda argument
86- " B905" , # zip-without-explicit-strict (conflicts with ty on 3.8)
87- " C901" , # Too complex
88- " COM812" , # Conflict with formatter
89- " CPY" , # No copyright statements
90- " D" , # Docstring rules
91- " DOC" , # Docstring content rules
92- " E501" , # Line too long (formatter handles it)
93- " FBT" , # Boolean positional arguments
94- " INP001" , # Implicit namespace package
95- " ISC001" , # Conflict with formatter
96- " PLC0415" , # import at top level
97- " PLR0904" , # Too many public methods
98- " PLR0911" , # Too many return statements
99- " PLR0912" , # Too many branches
100- " PLR0913" , # Too many arguments
101- " PLR0914" , # Too many local variables
102- " PLR0915" , # Too many statements
103- " PLR0917" , # Too many positional arguments
104- " PLR1702" , # Too many nested blocks
105- " PLR2004" , # Magic value used in comparison
106- " PLR6301" , # Method could be a function
107- " PTH" , # Use pathlib (existing code uses os.path)
108- " PYI024" , # Use `typing.NamedTuple` instead of `collections.namedtuple`
109- " RUF067" , # __init__ module should only contain re-exports
110- " S104" , # Possible binding to all interface
111- " S404" , # subprocess module is possibly insecure
112- " S603" , # `subprocess` call: check for execution of untrusted input
113- " SLF001" , # Private member accessed
114- " TID252" , # Prefer absolute imports over relative (internal package uses relative)
115- " TRY301" , # Abstract `raise` to an inner function
79+ " COM812" , # Conflict with formatter
80+ " CPY" , # No copyright statements
81+ " D203" , # `one-blank-line-before-class` and `no-blank-line-before-class` are incompatible
82+ " D212" , # `multi-line-summary-first-line` and `multi-line-summary-second-line` are incompatible
83+ " DOC201" , # `return` is not documented in docstring
84+ " DOC402" , # `yield` is not documented in docstring
85+ " DOC501" , # `raises` is not documented in docstring
86+ " ISC001" , # Conflict with formatter
87+ " S104" , # Possible binding to all interface
88+ ]
89+ lint.per-file-ignores."docs/**/*.py" = [
90+ " INP001" , # no __init__.py in docs directory
91+ ]
92+ lint.per-file-ignores."src/py_discovery/_discovery.py" = [
93+ " PTH" , # shim resolution uses string-based os.path for consistency with env variables
94+ ]
95+ lint.per-file-ignores."src/py_discovery/_py_info.py" = [
96+ " PTH" , # must use os.path — file runs as subprocess script with only stdlib
97+ ]
98+ lint.per-file-ignores."src/py_discovery/_windows/_pep514.py" = [
99+ " PTH" , # os.path.exists is monkeypatched in tests; pathlib.Path.exists bypasses the mock
116100]
117101lint.per-file-ignores."tests/**/*.py" = [
102+ " D" , # don't care about documentation in tests
103+ " FBT" , # don't care about booleans as positional arguments in tests
118104 " INP001" , # no implicit namespace
119- " PLC2701" , # Private imports
105+ " PLC0415" , # imports inside test functions (conditional on mocking)
106+ " PLC2701" , # private imports needed to test internal APIs
107+ " PLR0913" , # too many arguments (pytest fixtures)
108+ " PLR2004" , # Magic value used in comparison
120109 " S101" , # asserts allowed in tests
121- " S102" , # use of exec
110+ " S404" , # subprocess import
111+ " S603" , # `subprocess` call: check for execution of untrusted input
112+ " SLF001" , # private member access needed to test internals
122113]
123114lint.per-file-ignores."tests/windows/winreg_mock_values.py" = [
124115 " F821" , # undefined name (winreg available only on Windows)
@@ -173,5 +164,15 @@ paths.source = [
173164src.exclude = [ " tests/windows/winreg_mock_values.py" ]
174165
175166[[tool .ty .overrides ]]
176- include = [ " src/py_discovery/_py_info.py" , " tests/test_py_info_extra.py" ]
167+ include = [ " src/py_discovery/_py_info.py" , " src/py_discovery/_py_spec.py" ]
168+ rules.unused-ignore-comment = " ignore"
169+ rules.invalid-argument-type = " ignore"
170+ rules.invalid-return-type = " ignore"
171+ rules.no-matching-overload = " ignore"
172+
173+ [[tool .ty .overrides ]]
174+ include = [ " tests/**/*.py" ]
177175rules.unused-ignore-comment = " ignore"
176+ rules.invalid-argument-type = " ignore"
177+ rules.no-matching-overload = " ignore"
178+ rules.unresolved-attribute = " ignore"
0 commit comments