Visitar URL original
Merge branch 'main' into charlie/metaclass · astral-sh/ruff@b2cd8ed · GitHub
Skip to content

Commit b2cd8ed

Browse files
committed
Merge branch 'main' into charlie/metaclass
* main: [ty] Filter out unsatisfiable inference attempts during generic call narrowing (#24025) [ty] Avoid inferring intersection types for call arguments (#23933) [ty] Pin mypy_primer in `setup_primer_project.py` (#24020) [`pycodestyle`] Recognize `pyrefly:` as a pragma comment (`E501`) (#24019) Add company AI policy to contributing guide (#24021) [ty] Remove the mypy_primer CI workflow (#24016) Update prek dependencies (#23980) [ty] Smarter semantic token classification for attribute access on union type (#23841) [ty] ecosystem-analyzer: Inline diffs and panic messages (#24015) [ty] Improve `.toml` support in the ty playground (#23476) PEP 639 license information (#19661)
2 parents 0dac096 + 744c996 commit b2cd8ed

35 files changed

Lines changed: 1088 additions & 692 deletions

‎.github/actionlint.yaml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,3 @@ self-hosted-runner:
1313
- github-windows-2025-x86_64-8
1414
- github-windows-2025-x86_64-16
1515
- codspeed-macro
16-
17-
paths:
18-
".github/workflows/mypy_primer.yaml":
19-
ignore:
20-
- 'constant expression "false" in condition. remove the if: section'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#:schema ../ty.schema.json
2-
# Configuration overrides for the mypy primer run
2+
# Configuration overrides for ty ecosystem analysis
33

44
# Enable off-by-default rules.
55
[rules]

‎.github/workflows/memory_report.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
- "!**.md"
2121
- "!**.snap"
2222
# It's tempting to skip all Python files in every directory,
23-
# but changes to Python files in `ty_vendored` can affect the output of mypy_primer,
23+
# but changes to Python files in `ty_vendored` can affect the output of ecosystem runs,
2424
# so we apply a narrow exemption for all files in the corpus directory instead.
2525
- "!crates/ty_python_semantic/resources/corpus/**"
2626

‎.github/workflows/mypy_primer.yaml‎

Lines changed: 0 additions & 124 deletions
This file was deleted.

‎.github/workflows/ty-ecosystem-analyzer.yaml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ on:
1515
- "crates/ruff_python_ast"
1616
- "crates/ruff_python_parser"
1717
- ".github/workflows/ty-ecosystem-analyzer.yaml"
18-
- ".github/workflows/mypy_primer.yaml"
19-
- "scripts/mypy_primer.sh"
20-
- "scripts/mypy_primer_selector.py"
18+
- ".github/ty-ecosystem.toml"
19+
- "crates/ty_python_semantic/resources/primer/**"
2120
- "Cargo.lock"
2221
- "!**.md"
2322
- "!**.snap"
@@ -69,9 +68,9 @@ jobs:
6968
run: |
7069
cd ruff
7170
72-
echo "Enabling configuration overloads (see .github/mypy-primer-ty.toml)"
71+
echo "Enabling configuration overloads (see .github/ty-ecosystem.toml)"
7372
mkdir -p ~/.config/ty
74-
cp .github/mypy-primer-ty.toml ~/.config/ty/ty.toml
73+
cp .github/ty-ecosystem.toml ~/.config/ty/ty.toml
7574
7675
echo "new commit"
7776
git checkout -b new_commit "$GITHUB_SHA"
@@ -87,7 +86,7 @@ jobs:
8786
8887
cd ..
8988
90-
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@3b27e0b28a5314240c218e939bde0c6c02a39652"
89+
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@2907323c61016ffd2cab9c25fb255f3dab8ec256"
9190
9291
ecosystem-analyzer \
9392
--repository ruff \

‎.github/workflows/ty-ecosystem-report.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ jobs:
5050
run: |
5151
cd ruff
5252
53-
echo "Enabling configuration overloads (see .github/mypy-primer-ty.toml)"
53+
echo "Enabling configuration overloads (see .github/ty-ecosystem.toml)"
5454
mkdir -p ~/.config/ty
55-
cp .github/mypy-primer-ty.toml ~/.config/ty/ty.toml
55+
cp .github/ty-ecosystem.toml ~/.config/ty/ty.toml
5656
5757
cd ..
5858
59-
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@3b27e0b28a5314240c218e939bde0c6c02a39652"
59+
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@2907323c61016ffd2cab9c25fb255f3dab8ec256"
6060
6161
ecosystem-analyzer \
6262
--verbose \

‎.github/workflows/typing_conformance.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ on:
1919
- "Cargo.lock"
2020
- "!**.md"
2121
- "!**.snap"
22-
# It's tempting to skip all Python files in every directory,
23-
# but changes to Python files in `ty_vendored` can affect the output of mypy_primer,
22+
# It's tempting to skip all Python files in every directory, but changes to
23+
# Python files in `ty_vendored` can affect the output of the ecosystem analysis,
2424
# so we apply a narrow exemption for all files in the corpus directory instead.
2525
- "!crates/ty_python_semantic/resources/corpus/**"
2626

‎.github/zizmor.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rules:
2+
# TODO(charlie): Move these workflows to use dedicated GitHub environments.
3+
secrets-outside-env:
4+
ignore:
5+
- notify-dependents.yml
6+
- publish-docs.yml
7+
- publish-playground.yml
8+
- publish-ty-playground.yml
9+
- publish-versions.yml
10+
- publish-wasm.yml

‎.pre-commit-config.yaml‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ repos:
5252
language: system
5353
types: [rust]
5454
priority: 0
55-
- id: check-mypy-primer-sha
56-
name: Check mypy-primer SHA is in sync
57-
entry: python3 scripts/check_mypy_primer_sha.py
58-
language: system
59-
pass_filenames: false
60-
files: ^scripts/(mypy_primer\.sh|setup_primer_project\.py)$
61-
priority: 0
62-
6355
# Prettier
6456
- repo: https://github.com/rbubley/mirrors-prettier
6557
rev: v3.8.1
@@ -71,7 +63,7 @@ repos:
7163
# zizmor detects security vulnerabilities in GitHub Actions workflows.
7264
# Additional configuration for the tool is found in `.github/zizmor.yml`
7365
- repo: https://github.com/zizmorcore/zizmor-pre-commit
74-
rev: v1.22.0
66+
rev: v1.23.1
7567
hooks:
7668
- id: zizmor
7769
priority: 0
@@ -104,7 +96,7 @@ repos:
10496
priority: 0
10597

10698
- repo: https://github.com/astral-sh/ruff-pre-commit
107-
rev: v0.15.4
99+
rev: v0.15.5
108100
hooks:
109101
- id: ruff-format
110102
exclude: crates/ty_python_semantic/resources/corpus/
@@ -118,7 +110,7 @@ repos:
118110

119111
# Priority 1: Second-pass fixers (e.g., markdownlint-fix runs after mdformat).
120112
- repo: https://github.com/igorshubovych/markdownlint-cli
121-
rev: v0.47.0
113+
rev: v0.48.0
122114
hooks:
123115
- id: markdownlint-fix
124116
exclude: |
@@ -130,7 +122,7 @@ repos:
130122

131123
# Priority 2: ruffen-docs runs after markdownlint-fix (both modify markdown).
132124
- repo: https://github.com/astral-sh/ruff-pre-commit
133-
rev: v0.15.4
125+
rev: v0.15.5
134126
hooks:
135127
- id: ruff-format
136128
name: mdtest format

‎CONTRIBUTING.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ exploration of new features, we will often close these pull requests immediately
3737
new feature to ruff creates a long-term maintenance burden and requires strong consensus from the ruff
3838
team before it is appropriate to begin work on an implementation.
3939

40+
## Use of AI
41+
42+
We **require all use of AI in contributions to follow our
43+
[AI Policy](https://github.com/astral-sh/.github/blob/main/AI_POLICY.md)**.
44+
45+
If your contribution does not follow the policy, it will be closed.
46+
4047
## The Basics
4148

4249
### Prerequisites

0 commit comments

Comments
 (0)