File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -1416,17 +1416,15 @@ impl<'db: 'a, 'a> Class<'a> {
14161416 . get ( class_block. index ( ) )
14171417 . calculated ( )
14181418 {
1419- if !db. project . settings . mypy_compatible {
1420- let result = self . file . ensure_module_symbols_flow_analysis ( db) ;
1421- if result. is_err ( ) {
1422- debug ! (
1423- "Wanted to calculate class {:?} diagnostics, but could not calculated file {}" ,
1424- self . name( ) ,
1425- self . file. qualified_name( db)
1426- ) ;
1427- }
1428- result?;
1419+ let result = self . file . ensure_module_symbols_flow_analysis ( db) ;
1420+ if result. is_err ( ) {
1421+ debug ! (
1422+ "Wanted to calculate class {:?} diagnostics, but could not calculated file {}" ,
1423+ self . name( ) ,
1424+ self . file. qualified_name( db)
1425+ ) ;
14291426 }
1427+ result?;
14301428 let result = FLOW_ANALYSIS . with ( |fa| {
14311429 fa. with_new_empty_and_delay_further ( db, || {
14321430 self . file
Original file line number Diff line number Diff line change @@ -546,3 +546,15 @@ def test_func():
546546 offset = data["next"]
547547 else:
548548 break
549+
550+ [case file_flow_analysis]
551+ from h import H
552+
553+ def blubb(self, h: H):
554+ h.asdf
555+
556+ [file h.py]
557+ x = undefined # E: Name "undefined" is not defined
558+
559+ class H:
560+ asdf = x
You can’t perform that action at this time.
0 commit comments