ruff/crates/ruff_python_ast
Shaygan Hooshyari 3062e71cff [ty] Assume type of self is typing.Self in method calls (#18007)
Part of https://github.com/astral-sh/ty/issues/159

This PR only adjusts the signature of a method so if it has a `self`
argument then that argument will have type of `Typing.Self` even if it's
not specified. If user provides an explicit annotation then Ty will not
override that annotation.

- https://github.com/astral-sh/ty/issues/1131
- https://github.com/astral-sh/ty/issues/1157
- https://github.com/astral-sh/ty/issues/1156
- https://github.com/astral-sh/ty/issues/1173
- https://github.com/astral-sh/ruff/pull/20328
- https://github.com/astral-sh/ty/issues/1163
- https://github.com/astral-sh/ty/issues/1196

Added mdtests.
Also some tests need https://github.com/astral-sh/ruff/pull/18473 to
work completely. So I added a todo for those new cases that I added.

---------

Co-authored-by: David Peter <mail@david-peter.de>
2025-09-25 14:14:38 +02:00
..
src [ty] Assume type of self is typing.Self in method calls (#18007) 2025-09-25 14:14:38 +02:00
ast.toml Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
Cargo.toml Make dependency get-size2 truly optional in ruff_python_ast (#19052) 2025-06-30 21:50:59 -05:00
generate.py [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00