File tree 5 files changed +25
-2
lines changed
5 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 11
11
- " Lib/_colorize.py"
12
12
- " Lib/_pyrepl/**"
13
13
- " Lib/test/libregrtest/**"
14
+ - " Lib/tomllib/**"
14
15
- " Misc/mypy/**"
15
16
- " Tools/build/generate_sbom.py"
16
17
- " Tools/cases_generator/**"
44
45
target : [
45
46
" Lib/_pyrepl" ,
46
47
" Lib/test/libregrtest" ,
48
+ " Lib/tomllib" ,
47
49
" Tools/build" ,
48
50
" Tools/cases_generator" ,
49
51
" Tools/clinic" ,
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def get_or_create_nest(
210
210
cont = cont [- 1 ]
211
211
if not isinstance (cont , dict ):
212
212
raise KeyError ("There is no nest behind this key" )
213
- return cont
213
+ return cont # type: ignore[no-any-return]
214
214
215
215
def append_nest_to_list (self , key : Key ) -> None :
216
216
cont = self .get_or_create_nest (key [:- 1 ])
@@ -679,7 +679,7 @@ def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
679
679
instead of returning illegal types.
680
680
"""
681
681
# 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 :
683
683
return float
684
684
685
685
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 2
2
3
3
_colorize.py
4
4
_pyrepl
5
+ tomllib
You can’t perform that action at this time.
0 commit comments