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 @@ -282,7 +282,7 @@ def get_or_create_nest(
282282                cont  =  cont [- 1 ]
283283            if  not  isinstance (cont , dict ):
284284                raise  KeyError ("There is no nest behind this key" )
285-         return  cont 
285+         return  cont    # type: ignore[no-any-return] 
286286
287287    def  append_nest_to_list (self , key : Key ) ->  None :
288288        cont  =  self .get_or_create_nest (key [:- 1 ])
@@ -741,7 +741,7 @@ def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
741741    instead of returning illegal types. 
742742    """ 
743743    # The default `float` callable never returns illegal types. Optimize it. 
744-     if  parse_float  is  float :   # type: ignore[comparison-overlap] 
744+     if  parse_float  is  float :
745745        return  float 
746746
747747    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