ruff/crates
Douglas Creager fe653de3dd
[ty] Infer parameter specializations of explicitly implemented generic protocols (#18054)
Follows on from (and depends on)
https://github.com/astral-sh/ruff/pull/18021.

This updates our function specialization inference to infer type
mappings from parameters that are generic protocols.

For now, this only works when the argument _explicitly_ implements the
protocol by listing it as a base class. (We end up using exactly the
same logic as for generic classes in #18021.) For this to work with
classes that _implicitly_ implement the protocol, we will have to check
the types of the protocol members (which we are not currently doing), so
that we can infer the specialization of the protocol that the class
implements.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-05-13 13:13:00 -04:00
..
ruff disable jemalloc on android (#18033) 2025-05-12 14:41:00 +02:00
ruff_annotate_snippets ruff_annotate_snippets: address unused code warnings 2025-04-07 08:24:08 -04:00
ruff_benchmark [ty] Induct into instances and subclasses when finding and applying generics (#18052) 2025-05-12 21:53:11 -04:00
ruff_cache Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_db ruff_db: completely rip lint: prefix out 2025-05-09 12:42:14 -04:00
ruff_dev [ty] Remove brackets around option names (#18037) 2025-05-12 11:16:03 +00:00
ruff_diagnostics
ruff_formatter Fix typos (#17988) 2025-05-09 14:57:14 -04:00
ruff_graph [ty] Update salsa (#17964) 2025-05-09 11:54:07 +02:00
ruff_index Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_linter [flake8-bugbear] Ignore B028 if skip_file_prefixes is present (#18047) 2025-05-12 17:06:51 -05:00
ruff_macros [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_notebook Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
ruff_options_metadata [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_python_ast [ruff_python_ast] Fix redundant visitation of test expressions in elif clause statements (#18064) 2025-05-13 07:10:23 +00:00
ruff_python_ast_integration_tests Visit Identifier node as part of the SourceOrderVisitor (#17110) 2025-04-01 16:58:09 +02:00
ruff_python_codegen Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_formatter Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_index Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_literal Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_parser Fix typos (#17988) 2025-05-09 14:57:14 -04:00
ruff_python_resolver Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_semantic [isort] Check full module path against project root(s) when categorizing first-party (#16565) 2025-05-05 11:40:01 -05:00
ruff_python_stdlib python_stdlib: update for 3.14 (#18014) 2025-05-11 11:25:54 -05:00
ruff_python_trivia Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_trivia_integration_tests
ruff_server Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
ruff_source_file Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
ruff_text_size Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_wasm Bump 0.11.9 (#17986) 2025-05-09 10:43:27 -05:00
ruff_workspace [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ty [ty] Add a note to the diagnostic if a new builtin is used on an old Python version (#18068) 2025-05-13 10:08:04 -04:00
ty_ide ty: switch to use annotate-snippets ID functionality 2025-05-09 12:42:14 -04:00
ty_project Avoid initializing progress bars early (#18049) 2025-05-12 15:07:55 -04:00
ty_python_semantic [ty] Infer parameter specializations of explicitly implemented generic protocols (#18054) 2025-05-13 13:13:00 -04:00
ty_server Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
ty_test [ty] Shorten snapshot names (#18039) 2025-05-13 18:43:19 +02:00
ty_vendored [ty] Add support for __all__ (#17856) 2025-05-07 21:42:42 +05:30
ty_wasm Avoid initializing progress bars early (#18049) 2025-05-12 15:07:55 -04:00