ruff
06f9f52e - [ty] Add support for `@warnings.deprecated` (#19376)

Commit
216 days ago
[ty] Add support for `@warnings.deprecated` (#19376) * [x] basic handling * [x] parse and discover `@warnings.deprecated` attributes * [x] associate them with function definitions * [x] associate them with class definitions * [x] add a new "deprecated" diagnostic * [x] ensure diagnostic is styled appropriately for LSPs (DiagnosticTag::Deprecated) * [x] functions * [x] fire on calls * [x] fire on arbitrary references * [x] classes * [x] fire on initializers * [x] fire on arbitrary references * [x] methods * [x] fire on calls * [x] fire on arbitrary references * [ ] overloads * [ ] fire on calls * [ ] fire on arbitrary references(??? maybe not ???) * [ ] only fire if the actual selected overload is deprecated * [ ] dunder desugarring (warn on deprecated `__add__` if `+` is invoked) * [ ] alias supression? (don't warn on uses of variables that deprecated items were assigned to) * [ ] import logic * [x] fire on imports of deprecated items * [ ] suppress subsequent diagnostics if the import diagnostic fired (is this handled by alias supression?) * [x] fire on all qualified references (`module.mydeprecated`) * [x] fire on all references that depend on a `*` import Fixes https://github.com/astral-sh/ty/issues/153
Author
Parents
Loading