ruff
149350bf - [ty] Enforce `typing.Final` (#19178)

Commit
69 days ago
[ty] Enforce `typing.Final` (#19178) ## Summary Emit a diagnostic when a `Final`-qualified symbol is modified. This first iteration only works for name targets. Tests with TODO comments were added for attribute assignments as well. related ticket: https://github.com/astral-sh/ty/issues/158 ## Ecosystem impact Correctly identified [modification of a `Final` symbol](https://github.com/sphinx-doc/sphinx/blob/7b4164a5f2b64781475e64daf2d05cce2a0261d8/sphinx/__init__.py#L44) (behind a `# type: ignore`): ```diff - warning[unused-ignore-comment] sphinx/__init__.py:44:56: Unused blanket `type: ignore` directive ``` And the same [here](https://github.com/python-trio/trio/blob/5471a37e82b36f556e0d26b36cb95a6b05afbef1/src/trio/_core/_run.py#L128): ```diff - warning[unused-ignore-comment] src/trio/_core/_run.py:128:45: Unused blanket `type: ignore` directive ``` ## Test Plan New Markdown tests
Author
Parents
Loading