Closed pawamoy closed 7 months ago
Hi, could you please describe more about the bug, with current behaviour and expected behaviour
Sure, sorry for the low quality report 😅
For example with:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from thing import stuff
If you remove the import under the type checking condition, Griffe will report that stuff
was removed from the module.
But this is wrong: stuff
was never available at runtime, and therefore should not be reported.
Griffe already detects such "type-guarded" objects, and sets runtime=False
on them. We could use this runtime
attribute to prevent reporting their removal.
Hi @pawamoy, I guess the current version of griffe doesn't report this error. I tried to test it by passing it to find_breaking_changes(). it checks the runtime and ignores reporting.
or am I in the wrong direction? help me to understand it
Well, it seems I cannot reproduce the issue described here :thinking: I noticed a few times typing-related objects being reported, and I suppose I wrongly thought they were type-guarded while they were not :thinking: Sorry that you wasted time on this :bow: Lets close. I'll reopen if I find a reproducible example.
Describe the bug A removed type-guarded item will be reported. It should not, since it's not available at runtime.