himanshuchawla0807-gif commented on PR #76692:
URL: https://github.com/apache/airflow/pull/76692#issuecomment-6718989358
I found a small false positive in the new guard at fcf6ec2. A symbol in the
`else` branch of `if not TYPE_CHECKING` is unavailable at runtime, but
`get_module_names()` reports it as present:
```python
from typing import TYPE_CHECKING
if not TYPE_CHECKING:
class Runtime:
pass
else:
class TypingOnly:
pass
```
I executed the module and the PR's exact helper against it. Only `Runtime`
was bound at runtime, while the helper returned both names. Recognizing unary
`not` around the existing `is_type_checking()` predicate and visiting only the
body for that case matched runtime. Codex generated and ran this isolated check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]