@@ -7,11 +7,11 @@ name = "microsoft-python-type-stubs"
77version = " 0"
88
99[dependency-groups ]
10- hygiene = [" ruff ==0.11 .*" ]
10+ hygiene = [" ruff ==0.14 .*" ]
1111tests = [
1212 # Tools used for testing
1313 " docopt-ng" ,
14- " mypy ==1.16 .*" ,
14+ " mypy ==1.19 .*" ,
1515 " pyright" ,
1616
1717 # External type stubs and optional dependencies
@@ -55,15 +55,22 @@ target-version = "py39"
5555extend-select = [
5656 " FA" , # flake8-future-annotations
5757 " I" , # isort
58- " PGH" , # pygrep-hooks
5958 " PGH" , # pygrep-hooks and blanket-noqa
60- " PIE790 " , # unnecessary-placeholder
59+ " PIE " , # flake8-pie and unnecessary-placeholder
6160 " PYI" , # flake8-pyi
6261 " RUF" , # Ruff-specific and unused-noqa
62+ " TC" , # flake8-type-checking
6363 " UP" , # pyupgrade
6464 " W" , # pycodestyle Warning
65+ " YTT" , # flake8-2020 (version_info misuses)
6566]
6667ignore = [
68+ # Not colored correctly in Pylance https://github.com/microsoft/pylance-release/issues/6942
69+ " UP047" ,
70+
71+ # TODO: Investigate and fix or configure
72+ " PYI051" , # Request for autofix: https://github.com/astral-sh/ruff/issues/14185
73+
6774 # ##
6875 # Rules we don't want or don't agree with
6976 # ##
@@ -77,9 +84,6 @@ ignore = [
7784 " PYI011" ,
7885 " PYI014" ,
7986 " PYI053" ,
80-
81- # TODO: Investigate and fix or configure
82- " PYI051" , # Request for autofix: https://github.com/astral-sh/ruff/issues/14185
8387]
8488
8589[tool .ruff .lint .per-file-ignores ]
@@ -144,13 +148,12 @@ reportSelfClsParameterName = false
144148reportUnsupportedDunderAll = " error"
145149
146150[tool .mypy ]
151+ fixed_format_cache = true # Will be default in mypy 1.20
147152strict = true
148- check_untyped_defs = true # Strict check on all defs
149153show_column_numbers = true
150154# Not all imports in these stubs are gonna be typed
151155# Don't infer symbols from untyped packages as Any
152156follow_untyped_imports = true
153- warn_unused_ignores = false # Change from pandas
154157# Partial stubs are acceptable
155158disallow_any_generics = false
156159disallow_incomplete_defs = false
@@ -165,25 +168,30 @@ disable_error_code = [
165168 # as they are inherited from the implementation.
166169 " override" ,
167170 # TODO
168- " assignment" , # 744 errors in 155 files
171+ " assignment" , # 688 errors in 155 files
169172]
170173
171174[[tool .mypy .overrides ]]
172175# follow_untyped_imports = true will cause stubtest to run mypy on the source
173176# So disable it for partial stubs
174177module = [" sympy.*" ]
175178follow_untyped_imports = false
176- disable_error_code = [" import-untyped" , " misc" ]
179+ disable_error_code = [
180+ " import-untyped" ,
181+ # TODO
182+ " misc" ,
183+ ]
177184
178185[[tool .mypy .overrides ]]
179186# These modules are to be removed soon, not worth solving many issues
180- module = [" matplotlib.*" , " networkx.*" ]
187+ module = [" matplotlib.*" ]
188+ disable_error_code = [" assignment" , " misc" , " untyped-decorator" ]
189+
190+ [[tool .mypy .overrides ]]
191+ module = [" skimage.*" , " sklearn.*" ]
181192disable_error_code = [
182- " assignment " ,
193+ # TODO
183194 " misc" ,
195+ # TODO: Too many untyped decorators still left
196+ " untyped-decorator" ,
184197]
185- [[tool .mypy .overrides ]]
186- module = [" skimage.*" , " sklearn.*" ]
187- # TODO: Too many untyped decorators still left
188- # https://github.com/python/mypy/issues/19148
189- disable_error_code = [" misc" ]
0 commit comments