File tree Expand file tree Collapse file tree 5 files changed +25
-2
lines changed Expand file tree Collapse file tree 5 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1111 - " Lib/_colorize.py"
1212 - " Lib/_pyrepl/**"
1313 - " Lib/test/libregrtest/**"
14+ - " Lib/tomllib/**"
1415 - " Misc/mypy/**"
1516 - " Tools/build/generate_sbom.py"
1617 - " Tools/cases_generator/**"
4445 target : [
4546 " Lib/_pyrepl" ,
4647 " Lib/test/libregrtest" ,
48+ " Lib/tomllib" ,
4749 " Tools/build" ,
4850 " Tools/cases_generator" ,
4951 " Tools/clinic" ,
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def get_or_create_nest(
210210 cont = cont [- 1 ]
211211 if not isinstance (cont , dict ):
212212 raise KeyError ("There is no nest behind this key" )
213- return cont
213+ return cont # type: ignore[no-any-return]
214214
215215 def append_nest_to_list (self , key : Key ) -> None :
216216 cont = self .get_or_create_nest (key [:- 1 ])
@@ -679,7 +679,7 @@ def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
679679 instead of returning illegal types.
680680 """
681681 # The default `float` callable never returns illegal types. Optimize it.
682- if parse_float is float : # type: ignore[comparison-overlap]
682+ if parse_float is float :
683683 return float
684684
685685 def safe_parse_float (float_str : str ) -> Any :
Original file line number Diff line number Diff line change 1+ # Config file for running mypy on tomllib.
2+ # Run mypy by invoking `mypy --config-file Lib/tomllib/mypy.ini`
3+ # on the command-line from the repo root
4+
5+ [mypy]
6+ files = Lib/tomllib
7+ mypy_path = $MYPY_CONFIG_FILE_DIR/../../Misc/mypy
8+ explicit_package_bases = True
9+ python_version = 3.12
10+ pretty = True
11+
12+ # Enable most stricter settings
13+ enable_error_code = ignore-without-code
14+ strict = True
15+ strict_bytes = True
16+ local_partial_types = True
17+ warn_unreachable = True
18+ # TODO(@sobolevn): remove this setting and refactor any found problems
19+ disallow_any_generics = False
Original file line number Diff line number Diff line change 1+ ../../Lib/tomllib
Original file line number Diff line number Diff line change 22
33_colorize.py
44_pyrepl
5+ tomllib
You can’t perform that action at this time.
0 commit comments