Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions rust/src/import_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,10 @@ impl<'a> StatementVisitor<'a> for Visitor<'a> {
walk_stmt(self, stmt);
}
}
Expr::Attribute(expr) => {
if expr.attr.id == "TYPE_CHECKING" {
self.typechecking_only = true;
walk_stmt(self, stmt);
self.typechecking_only = false;
} else {
walk_stmt(self, stmt);
}
Expr::Attribute(expr) if expr.attr.id == "TYPE_CHECKING" => {
self.typechecking_only = true;
walk_stmt(self, stmt);
self.typechecking_only = false;
}
_ => {
walk_stmt(self, stmt);
Expand Down
4 changes: 2 additions & 2 deletions tests/adaptors/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def __init__(
"""
self.contents = self._parse_contents(contents)
self._raw_contents = contents
self.content_map = content_map if content_map else {}
self.mtime_map: dict[str, float] = mtime_map if mtime_map else {}
self.content_map = content_map or {}
self.mtime_map: dict[str, float] = mtime_map or {}

@property
def sep(self) -> str:
Expand Down
Loading