File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ def verify_cache(
234234    ) ->  None :
235235        if  not  blocker :
236236            # There should be valid cache metadata for each module except 
237-             # for those that had an  error in themselves or one of their 
237+             # in case of a blocking  error in themselves or one of their 
238238            # dependencies. 
239239            modules  =  self .find_module_files (manager )
240240            modules .update ({module_name : path  for  module_name , path , text  in  module_data })
Original file line number Diff line number Diff line change @@ -7237,3 +7237,49 @@ bar: int = foo
72377237[out2]
72387238[out3]
72397239tmp/bar.py:2: error: Incompatible types in assignment (expression has type "None", variable has type "int")
7240+ 
7241+ [case testIncrementalBlockingErrorRepeatAndUndo]
7242+ import m
7243+ [file m.py]
7244+ import f
7245+ reveal_type(f.x)
7246+ [file m.py.3]
7247+ import f
7248+ reveal_type(f.x)
7249+ # touch
7250+ [file f.py]
7251+ x = 1
7252+ [file f.py.2]
7253+ no way
7254+ [file f.py.4]
7255+ x = 1
7256+ [out]
7257+ tmp/m.py:2: note: Revealed type is "builtins.int"
7258+ [out2]
7259+ tmp/f.py:1: error: Invalid syntax
7260+ [out3]
7261+ tmp/f.py:1: error: Invalid syntax
7262+ [out4]
7263+ tmp/m.py:2: note: Revealed type is "builtins.int"
7264+ 
7265+ [case testIncrementalSameErrorOrder]
7266+ import m
7267+ [file m.py]
7268+ import n
7269+ def accept_int(x: int) -> None: pass
7270+ accept_int(n.foo)
7271+ [file n.py]
7272+ import other
7273+ foo = "hello"
7274+ reveal_type(foo)
7275+ [file other.py]
7276+ [file other.py.2]
7277+ # touch
7278+ [rechecked other]
7279+ [stale]
7280+ [out]
7281+ tmp/n.py:3: note: Revealed type is "builtins.str"
7282+ tmp/m.py:3: error: Argument 1 to "accept_int" has incompatible type "str"; expected "int"
7283+ [out2]
7284+ tmp/n.py:3: note: Revealed type is "builtins.str"
7285+ tmp/m.py:3: error: Argument 1 to "accept_int" has incompatible type "str"; expected "int"
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments