ruff/crates/ruff_linter
Charlie Marsh 519a65007f
Mark quotes as unnecessary for non-evaluated annotations (#11485)
## Summary

Similar to #11414, this PR extends `UP037` to flag quoted annotations
that are located in positions that won't be evaluated at runtime.

For example, the quotes on `Tuple` are unnecessary in:

```python
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from typing import Tuple


def foo():
    x: "Tuple[int, int]" = (0, 0)

foo()
```
2024-05-22 15:44:31 -04:00
..
resources Mark quotes as unnecessary for non-evaluated annotations (#11485) 2024-05-22 15:44:31 -04:00
src Mark quotes as unnecessary for non-evaluated annotations (#11485) 2024-05-22 15:44:31 -04:00
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00
Cargo.toml Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00