cool-easter-32542
05/09/2023, 9:04 PMdef test_uhoh(rule_runner: RuleRunner) -> None:
content = dedent(
"""\
try:
# uh oh
from one import thing, other_thing
except ImportError:
from .one import thing, other_thing
"""
)
assert_deps_parsed(
rule_runner,
content,
filename=f"a/b/c/d.py",
expected_imports={
"one.thing": ImpInfo(lineno=3, weak=True),
"one.other_thing": ImpInfo(lineno=3, weak=True),
"a.b.c.one.thing": ImpInfo(lineno=5, weak=False),
"a.b.c.one.other_thing": ImpInfo(lineno=5, weak=False),
},
)
Toggling the comment toggles the failure 😱
pantsbuild/pantscool-easter-32542
05/10/2023, 9:26 PM