ruff
da8aa6a6 - [ty] Support iterating over enums (#19486)

Commit
142 days ago
[ty] Support iterating over enums (#19486) ## Summary Infer the correct type in a scenario like this: ```py class Color(Enum): RED = 1 GREEN = 2 BLUE = 3 for color in Color: reveal_type(color) # revealed: Color ``` We should eventually support this out-of-the-box when https://github.com/astral-sh/ty/issues/501 is implemented. For this reason, @AlexWaygood would prefer to keep things as they are (we currently infer `Unknown`, so false positives seem unlikely). But it seemed relatively easy to support, so I'm opening this for discussion. part of https://github.com/astral-sh/ty/issues/183 ## Test Plan Adapted existing test. ## Ecosystem analysis ```diff - warning[unused-ignore-comment] rotkehlchen/chain/aggregator.py:591:82: Unused blanket `type: ignore` directive ``` This `unused-ignore-comment` goes away due to a new true positive.
Author
Parents
Loading