Skip to content

Commit 6d3e6a9

Browse files
AstroidBuildingException -> AstroidBuildingError
Refs pylint-dev/astroid#2384
1 parent 2088414 commit 6d3e6a9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pylint/checkers/variables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _is_from_future_import(stmt: nodes.ImportFrom, name: str) -> bool | None:
141141
"""Check if the name is a future import from another module."""
142142
try:
143143
module = stmt.do_import_module(stmt.modname)
144-
except astroid.AstroidBuildingException:
144+
except astroid.AstroidBuildingError:
145145
return None
146146

147147
for local_node in module.locals.get(name, []):
@@ -2059,7 +2059,7 @@ def visit_importfrom(self, node: nodes.ImportFrom) -> None:
20592059
name_parts = node.modname.split(".")
20602060
try:
20612061
module = node.do_import_module(name_parts[0])
2062-
except astroid.AstroidBuildingException:
2062+
except astroid.AstroidBuildingError:
20632063
return
20642064
module = self._check_module_attrs(node, module, name_parts[1:])
20652065
if not module:

pylint/pyreverse/inspector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _astroid_wrapper(
3535
print(f"parsing {modname}...")
3636
try:
3737
return func(modname)
38-
except astroid.exceptions.AstroidBuildingException as exc:
38+
except astroid.exceptions.AstroidBuildingError as exc:
3939
print(exc)
4040
except Exception: # pylint: disable=broad-except
4141
traceback.print_exc()

0 commit comments

Comments
 (0)