ruff/crates
Douglas Creager ca4fdf452d
Create TypeVarInstance type for legacy typevars (#16538)
We are currently representing type variables using a `KnownInstance`
variant, which wraps a `TypeVarInstance` that contains the information
about the typevar (name, bounds, constraints, default type). We were
previously only constructing that type for PEP 695 typevars. This PR
constructs that type for legacy typevars as well.

It also detects functions that are generic because they use legacy
typevars in their parameter list. With the existing logic for inferring
specializations of function calls (#17301), that means that we are
correctly detecting that the definition of `reveal_type` in the typeshed
is generic, and inferring the correct specialization of `_T` for each
call site.

This does not yet handle legacy generic classes; that will come in a
follow-on PR.
2025-04-29 09:03:06 -04:00
..
red_knot ruff_db: render file paths in diagnostics as relative paths if possible 2025-04-28 14:32:34 -04:00
red_knot_ide ruff_db: render file paths in diagnostics as relative paths if possible 2025-04-28 14:32:34 -04:00
red_knot_project [red-knot] Improve log message for default python platform (#17700) 2025-04-29 08:26:41 +00:00
red_knot_python_semantic Create TypeVarInstance type for legacy typevars (#16538) 2025-04-29 09:03:06 -04:00
red_knot_server Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
red_knot_test Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
red_knot_vendored Sync vendored typeshed stubs (#17402) 2025-04-15 09:16:42 +02:00
red_knot_wasm [red-knot] Fix offset handling in playground for 2-code-point UTF16 characters (#17520) 2025-04-27 11:44:55 +01:00
ruff Add config option to disable typing_extensions imports (#17611) 2025-04-28 14:57:36 -04:00
ruff_annotate_snippets ruff_annotate_snippets: address unused code warnings 2025-04-07 08:24:08 -04:00
ruff_benchmark Create TypeVarInstance type for legacy typevars (#16538) 2025-04-29 09:03:06 -04:00
ruff_cache
ruff_db ruff_db: render file paths in diagnostics as relative paths if possible 2025-04-28 14:32:34 -04:00
ruff_dev Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171) 2025-04-03 15:59:44 +00:00
ruff_diagnostics
ruff_formatter Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171) 2025-04-03 15:59:44 +00:00
ruff_graph [red-knot] Detect version-related syntax errors (#16379) 2025-04-17 14:00:30 -04:00
ruff_index [red-knot] Don't use separate ID types for each alist (#16415) 2025-02-28 14:55:55 -05:00
ruff_linter [ruff] add fix safety section (RUF017) (#17480) 2025-04-28 22:07:22 +00:00
ruff_macros Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171) 2025-04-03 15:59:44 +00:00
ruff_notebook Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
ruff_python_ast Add Python 3.14 to configuration options (#17647) 2025-04-28 16:29:00 -05: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 Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171) 2025-04-03 15:59:44 +00:00
ruff_python_formatter Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
ruff_python_index
ruff_python_literal Preserve triple quotes and prefixes for strings (#15818) 2025-02-04 08:41:06 -05:00
ruff_python_parser Make syntax error for unparenthesized except tuples version specific to before 3.14 (#17660) 2025-04-29 07:55:30 -05:00
ruff_python_resolver Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171) 2025-04-03 15:59:44 +00:00
ruff_python_semantic [pylint] Detect global declarations in module scope (PLE0118) (#17411) 2025-04-25 08:37:16 -04:00
ruff_python_stdlib
ruff_python_trivia [red-knot] Ignore surrounding whitespace when looking for <!-- snapshot-diagnostics --> directives in mdtests (#16380) 2025-02-27 13:25:31 +00:00
ruff_python_trivia_integration_tests Pass ParserOptions to the parser (#16220) 2025-02-19 10:50:50 -05:00
ruff_server Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
ruff_source_file [red-knot] Fix offset handling in playground for 2-code-point UTF16 characters (#17520) 2025-04-27 11:44:55 +01:00
ruff_text_size
ruff_wasm Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
ruff_workspace Add config option to disable typing_extensions imports (#17611) 2025-04-28 14:57:36 -04:00