Skip to content

Commit ebbedb7

Browse files
committed
try to optimize
1 parent 877fcd2 commit ebbedb7

File tree

1 file changed

+4
-2
lines changed
  • crates/ty_python_semantic/src/types/infer

1 file changed

+4
-2
lines changed

crates/ty_python_semantic/src/types/infer/builder.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,10 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
549549
);
550550

551551
// TODO: Only call this function when diagnostics are enabled.
552-
self.check_class_definitions();
553-
self.check_overloaded_functions(node);
552+
if self.db().should_check_file(self.file()) {
553+
self.check_class_definitions();
554+
self.check_overloaded_functions(node);
555+
}
554556
}
555557

556558
/// Iterate over all class definitions to check that the definition will not cause an exception

0 commit comments

Comments
 (0)