Skip to content

Commit c8135c5

Browse files
committed
Merge remote-tracking branch 'origin/main' into dcreager/satisfies
* origin/main: (21 commits) [ty] Update "constraint implication" relation to work on constraints between two typevars (#21068) [`flake8-type-checking`] Fix `TC003` false positive with `future-annotations` (#21125) [ty] Fix lookup of `__new__` on instances (#21147) Fix syntax error false positive on nested alternative patterns (#21104) [`pyupgrade`] Fix false positive for `TypeVar` with default on Python <3.13 (`UP046`,`UP047`) (#21045) [ty] Reachability and narrowing for enum methods (#21130) [ty] Use `range` instead of custom `IntIterable` (#21138) [`ruff`] Add support for additional eager conversion patterns (`RUF065`) (#20657) [`ruff-ecosystem`] Fix CLI crash on Python 3.14 (#21092) [ty] Infer type of `self` for decorated methods and properties (#21123) [`flake8-bandit`] Fix correct example for `S308` (#21128) [ty] Dont provide goto definition for definitions which are not reexported in builtins (#21127) [`airflow`] warning `airflow....DAG.create_dagrun` has been removed (`AIR301`) (#21093) [ty] follow the breaking API changes made in salsa-rs/salsa#1015 (#21117) [ty] Rename `Type::into_nominal_instance` (#21124) [ty] Filter out "unimported" from the current module [ty] Add evaluation test for auto-import including symbols in current module [ty] Refactor `ty_ide` completion tests [ty] Render `import <...>` in completions when "label details" isn't supported [`refurb`] Preserve digit separators in `Decimal` constructor (`FURB157`) (#20588) ...
2 parents a85198d + c0b04d4 commit c8135c5

File tree

83 files changed

+3178
-1267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3178
-1267
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,7 @@ jobs:
531531
persist-credentials: false
532532
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
533533
with:
534-
# TODO: figure out why `ruff-ecosystem` crashes on Python 3.14
535-
python-version: "3.13"
534+
python-version: ${{ env.PYTHON_VERSION }}
536535
activate-environment: true
537536

538537
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ regex-automata = { version = "0.4.9" }
146146
rustc-hash = { version = "2.0.0" }
147147
rustc-stable-hash = { version = "0.1.2" }
148148
# When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml`
149-
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "25b3ef146cfa2615f4ec82760bd0c22b454d0a12", default-features = false, features = [
149+
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "cdd0b85516a52c18b8a6d17a2279a96ed6c3e198", default-features = false, features = [
150150
"compact_str",
151151
"macros",
152152
"salsa_unstable",

crates/ruff_benchmark/benches/ty_walltime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static STATIC_FRAME: Benchmark = Benchmark::new(
226226
max_dep_date: "2025-08-09",
227227
python_version: PythonVersion::PY311,
228228
},
229-
750,
229+
800,
230230
);
231231

232232
#[track_caller]

crates/ruff_linter/resources/test/fixtures/airflow/AIR301_class_attribute.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
)
1111
from airflow.datasets.manager import DatasetManager
1212
from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector
13+
from airflow.models.dag import DAG
1314
from airflow.providers.amazon.aws.auth_manager.aws_auth_manager import AwsAuthManager
1415
from airflow.providers.apache.beam.hooks import BeamHook, NotAir302HookError
1516
from airflow.providers.google.cloud.secrets.secret_manager import (
@@ -20,6 +21,7 @@
2021
from airflow.secrets.base_secrets import BaseSecretsBackend
2122
from airflow.secrets.local_filesystem import LocalFilesystemBackend
2223

24+
2325
# airflow.Dataset
2426
dataset_from_root = DatasetFromRoot()
2527
dataset_from_root.iter_datasets()
@@ -56,6 +58,10 @@
5658
hlc.add_output_dataset()
5759
hlc.collected_datasets()
5860

61+
# airflow.models.dag.DAG
62+
test_dag = DAG(dag_id="test_dag")
63+
test_dag.create_dagrun()
64+
5965
# airflow.providers.amazon.auth_manager.aws_auth_manager
6066
aam = AwsAuthManager()
6167
aam.is_authorized_dataset()
@@ -96,3 +102,15 @@
96102
# airflow.secrets.local_filesystem
97103
lfb = LocalFilesystemBackend()
98104
lfb.get_connections()
105+
106+
from airflow.models import DAG
107+
108+
# airflow.DAG
109+
test_dag = DAG(dag_id="test_dag")
110+
test_dag.create_dagrun()
111+
112+
from airflow import DAG
113+
114+
# airflow.DAG
115+
test_dag = DAG(dag_id="test_dag")
116+
test_dag.create_dagrun()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Regression test for https://github.com/astral-sh/ruff/issues/21023
2+
'' '
3+
"" ""
4+
'' '' '
5+
"" "" "
6+
f"" f"
7+
f"" f"" f"

crates/ruff_linter/resources/test/fixtures/flake8_type_checking/TC003.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ def f():
1414
import os
1515

1616
print(os)
17+
18+
19+
# regression test for https://github.com/astral-sh/ruff/issues/21121
20+
from dataclasses import KW_ONLY, dataclass
21+
22+
23+
@dataclass
24+
class DataClass:
25+
a: int
26+
_: KW_ONLY # should be an exception to TC003, even with future-annotations
27+
b: int
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Regression test for an ecosystem hit on
3+
https://github.com/astral-sh/ruff/pull/21125.
4+
5+
We should mark all of the components of special dataclass annotations as
6+
runtime-required, not just the first layer.
7+
"""
8+
9+
from dataclasses import dataclass
10+
from typing import ClassVar, Optional
11+
12+
13+
@dataclass(frozen=True)
14+
class EmptyCell:
15+
_singleton: ClassVar[Optional["EmptyCell"]] = None
16+
# the behavior of _singleton above should match a non-ClassVar
17+
_doubleton: "EmptyCell"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""This is placed in a separate fixture as `TypeVar` needs to be imported
2+
from `typing_extensions` to support default arguments in Python version < 3.13.
3+
We verify that UP046 doesn't apply in this case.
4+
"""
5+
6+
from typing import Generic
7+
from typing_extensions import TypeVar
8+
9+
T = TypeVar("T", default=str)
10+
11+
12+
class DefaultTypeVar(Generic[T]):
13+
var: T

0 commit comments

Comments
 (0)