astral-sh
ruff
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Add new option format.markdown-code-format
amy/markdown-code-format-option
6 minutes ago
[`pyupgrade`] Allow shadowing non-builtin bindings (`UP029`) Summary -- I thought the fix unsafety example in the rule docs looked a bit suspicious while I was going through more potential default rules today: ```py def str(x): return x from builtins import str str(1) # `"1"` with the import, `1` without ``` Changing the behavior in this way seemed to go beyond fix unsafety and into bug territory. Sure enough, there was an existing bug report in #16182. This PR fixes #16182 (and the fix safety example) by checking that the builtin import that the rule flags is actually shadowing a builtin binding. I also left an exception for `from builtins import *`, but we could consider ignoring that case too. I initially tried reusing `SemanticModel::resolve_name` and `only_binding`, but they are specific to `ExprName`s because that seems to be all that is inserted into the `SemanticModel::resolved_names` map. Test Plan -- New tests based on #16182 and the fix safety docs
brent/up029
17 minutes ago
update snapshots
ibraheem/comprehension-tcx
49 minutes ago
[ty] Fix match statement narrowing for transparent enums (StrEnum/IntEnum) Transparent enums compare equal to their underlying primitive values at runtime, but the type checker was incorrectly narrowing to `Never` in match statements. Add special handling in narrowing logic to recognize transparent enum equality without modifying type disjointness relations.
bxff:fix-enum-custom-eq-narrowing
58 minutes ago
infer lambda expressions with `Callable` type context
ibraheem/lambda-tcx
1 hour ago
avoid inferring comprehensions without type context
ibraheem/comprehension-tcx
1 hour ago
support partially specialized type context
ibraheem/partial-tcx
1 hour ago
support partially specialized type context
ibraheem/partial-tcx
2 hours ago
Active Branches
Add new option `format.markdown-code-format`
last run
6 minutes ago
#22750
CodSpeed Performance Gauge
0%
[`pyupgrade`] Allow shadowing non-builtin bindings (`UP029`)
last run
17 minutes ago
#22749
CodSpeed Performance Gauge
0%
[ty] Propagate type context through comprehensions
last run
49 minutes ago
#22564
CodSpeed Performance Gauge
-1%
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs