Commit 5fb58fc
committed
merge upstream astral-sh/ruff (222 commits, jul 9 → jul 22 2026)
merges `upstream/main` at 47d7184 into the fork. 45 conflicts resolved;
typeshed regenerated from scratch; full suite green (10355 tests), ci insta
gate clean, clippy and prek clean.
notable ripples from upstream refactors:
- salsa `Update` derive renamed to `SalsaValue`; tracked functions and
interned fields now return references unless marked `returns(copy)`
- `Type::to_instance` returns an `InstanceProjection`; fork call sites that
only need the type use `to_instance_approximation`
- the parser collects into `expr_scratch`/`stmt_scratch` buffers, so the
fork's subscript and simple-statement hooks push there instead. the
`context`-parameter validation had to move after the buffers are drained,
or it inspected empty parameter lists and never fired
- upstream's two-tier expression cache replaces the fork's
`(expression, tcx) -> Type` map; the fluid fields are threaded through
`FullExpressionCacheEntry`
- `check_file` became a salsa query; `apply_overrides` became
`apply_override_options`
- `ProtocolMemberWrite` wraps the write capability, so the reified-member
lookup goes through `domain()`
- pydantic field metadata moved behind `pydantic::field_metadata`, which
gains the fork's `frozen` flag
fluid specializations needed a real fix: upstream now specializes a generic
call's parameter type from the arguments themselves, so every generic call
recorded a self-derived "adoption" and locked the specialization. argument
contexts built that way are marked `inferred_from_argument` and no longer
count as external observers.
the typeshed patch pipeline is reproducible from scratch again:
`container_overlapping` moved to the post-conversion pass (it matches the
converted `Element`/`Key` names and collided with `mapping` in pass 1), and
the sync script now runs the patches to a fixed point, since
`private type _X` only becomes visible after `TypeAliasStatements` writes
the `type _X = …` statement.
fork divergences newly exposed by upstream tests are annotated in place:
`isinstance(x, (List,))` through the recursive pep 695 `_ClassInfo` alias,
covariant `Mapping` keys not widening to the declared key type, `in` on a
provably-disjoint container erroring under `Overlapping`, and a `reveal_type`
in the arguments of a fluid-receiver call reporting an intermediate pass.565 files changed
Lines changed: 42210 additions & 11480 deletions
File tree
- .agents/skills
- minimizing-ty-ecosystem-changes
- wobbling-ty-constraint-order
- .github
- workflows
- crates
- basedpython
- src
- by_override_patch/src
- by_typeshed_patch/src
- patches
- mdtest
- src
- ruff_annotate_snippets
- src/renderer
- ruff_benchmark/benches
- ruff_cache
- src
- ruff_db
- src
- diagnostic
- files
- system
- os
- ruff_dev/src
- ruff_diagnostics
- ruff_formatter
- ruff_graph
- ruff_index
- src
- ruff_linter
- resources
- mdtest
- flake8-pyi
- pylint
- pyupgrade
- refurb
- ruff
- suppression
- test/fixtures
- pycodestyle
- ruff
- src
- checkers
- ast
- importer
- message
- rules
- fastapi/rules
- flake8_datetimez/rules
- flake8_pyi/rules
- flake8_simplify/rules
- pycodestyle
- rules
- snapshots
- pydocstyle/rules
- pylint/rules
- pyupgrade
- rules
- pep695
- snapshots
- refurb/rules
- ruff
- rules
- snapshots
- ruff_macros
- ruff_markdown
- ruff_mdtest/src
- ruff_memory_usage
- ruff_notebook
- src
- ruff_options_metadata
- ruff_python_ast
- src
- ruff_python_codegen
- ruff_python_formatter
- src
- string
- tests
- ruff_python_importer
- ruff_python_index
- ruff_python_literal
- src
- ruff_python_parser
- src
- lexer
- parser
- ruff_python_semantic
- src/cfg
- ruff_python_stdlib
- ruff_python_trivia
- src
- ruff_ranged_value
- ruff_server
- src
- server/api/requests
- session
- tests/e2e
- ruff_source_file
- ruff_text_size
- ruff_wasm
- ruff_workspace
- src
- ruff
- src
- commands
- tests
- cli
- snapshots
- ty_combine
- ty_completion_bench/src
- ty_completion_eval/src
- ty_ide/src
- call_hierarchy
- docstring
- document
- markdown
- general
- structured
- ty_module_resolver
- src
- ty_project
- src
- db
- metadata
- watch
- ty_python_core
- src
- use_def
- ty_python_semantic
- resources
- lint_docs
- mdtest
- annotations
- assignment
- boolean
- call
- class
- conditional
- dataclasses
- diagnostics
- exception
- external
- generics
- legacy
- pep695
- narrow
- conditionals
- regression
- snapshots
- subscript
- suppressions
- type_compendium
- type_of
- type_properties
- type_qualifiers
- src
- suppression
- types
- call
- bind
- class
- dedicated
- equality
- infer
- builder
- post_inference
- property_tests
- set_theoretic
- tests
- ty_server
- src
- server/api
- requests
- session
- tests/e2e
- snapshots
- ty_site_packages
- ty_static
- src
- ty_test
- src
- ty_vendored
- ty_extensions
- vendor/typeshed
- stdlib
- asyncio
- multiprocessing
- sqlite3
- xml/etree
- ty_wasm/src
- ty
- docs
- src
- tests
- cli
- snapshots
- docs
- fuzz
- fuzz_targets
- playground
- api
- python/ruff-ecosystem/ruff_ecosystem
- scripts
- benchmarks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
0 commit comments