Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Dec 23, 2024
1 parent 01b5b57 commit 1e0805b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion astroid/interpreter/_import/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def find_module(
processed and processed[0] in sys.stdlib_module_names
):
try:
spec = importlib.util.find_spec(".".join((*processed, modname)))
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=UserWarning)
spec = importlib.util.find_spec(".".join((*processed, modname)))
except ValueError:
# `find_spec` raises a ValueError for modules that are missing their `__spec__`
# attributes. We don't really understand why, but this is likely caused by
Expand Down

0 comments on commit 1e0805b

Please sign in to comment.