@@ -1983,26 +1983,29 @@ def verify_dependencies(self, suppressed_only: bool = False) -> None:
1983
1983
if self .priorities .get (dep ) != PRI_INDIRECT ]
1984
1984
all_deps = dependencies + self .suppressed + self .ancestors
1985
1985
for dep in all_deps :
1986
+ if dep in manager .modules :
1987
+ continue
1986
1988
options = manager .options .clone_for_module (dep )
1987
- if dep not in manager .modules and not options .ignore_missing_imports :
1988
- line = self .dep_line_map .get (dep , 1 )
1989
- try :
1990
- if dep in self .ancestors :
1991
- state , ancestor = None , self # type: (Optional[State], Optional[State])
1992
- else :
1993
- state , ancestor = self , None
1994
- # Called just for its side effects of producing diagnostics.
1995
- find_module_and_diagnose (
1996
- manager , dep , options ,
1997
- caller_state = state , caller_line = line ,
1998
- ancestor_for = ancestor )
1999
- except (ModuleNotFound , CompileError ):
2000
- # Swallow up any ModuleNotFounds or CompilerErrors while generating
2001
- # a diagnostic. CompileErrors may get generated in
2002
- # fine-grained mode when an __init__.py is deleted, if a module
2003
- # that was in that package has targets reprocessed before
2004
- # it is renamed.
2005
- pass
1989
+ if options .ignore_missing_imports :
1990
+ continue
1991
+ line = self .dep_line_map .get (dep , 1 )
1992
+ try :
1993
+ if dep in self .ancestors :
1994
+ state , ancestor = None , self # type: (Optional[State], Optional[State])
1995
+ else :
1996
+ state , ancestor = self , None
1997
+ # Called just for its side effects of producing diagnostics.
1998
+ find_module_and_diagnose (
1999
+ manager , dep , options ,
2000
+ caller_state = state , caller_line = line ,
2001
+ ancestor_for = ancestor )
2002
+ except (ModuleNotFound , CompileError ):
2003
+ # Swallow up any ModuleNotFounds or CompilerErrors while generating
2004
+ # a diagnostic. CompileErrors may get generated in
2005
+ # fine-grained mode when an __init__.py is deleted, if a module
2006
+ # that was in that package has targets reprocessed before
2007
+ # it is renamed.
2008
+ pass
2006
2009
2007
2010
def dependency_priorities (self ) -> List [int ]:
2008
2011
return [self .priorities .get (dep , PRI_HIGH ) for dep in self .dependencies + self .suppressed ]
0 commit comments