Skip to content

Commit 1e0805b

Browse files
committed
WIP
1 parent 01b5b57 commit 1e0805b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

astroid/interpreter/_import/spec.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ def find_module(
152152
processed and processed[0] in sys.stdlib_module_names
153153
):
154154
try:
155-
spec = importlib.util.find_spec(".".join((*processed, modname)))
155+
with warnings.catch_warnings():
156+
warnings.filterwarnings("ignore", category=UserWarning)
157+
spec = importlib.util.find_spec(".".join((*processed, modname)))
156158
except ValueError:
157159
# `find_spec` raises a ValueError for modules that are missing their `__spec__`
158160
# attributes. We don't really understand why, but this is likely caused by

0 commit comments

Comments
 (0)