Skip to content

Commit 66a4007

Browse files
authored
Merge branch 'main' into except_star
2 parents 0f362f5 + 8e19277 commit 66a4007

19 files changed

+469
-62
lines changed

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
)
2626
)
2727
steps:
28-
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
28+
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
2929
id: app-token
3030
with:
3131
app-id: ${{ vars.APP_ID }}

.github/workflows/ci.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
timeout-minutes: 20
2525
steps:
2626
- name: Check out code from GitHub
27-
uses: actions/checkout@v4.2.2
27+
uses: actions/checkout@v5.0.0
2828
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2929
id: python
3030
uses: actions/[email protected]
@@ -39,7 +39,7 @@ jobs:
3939
'requirements_full.txt', 'requirements_minimal.txt') }}" >> $GITHUB_OUTPUT
4040
- name: Restore Python virtual environment
4141
id: cache-venv
42-
uses: actions/[email protected].3
42+
uses: actions/[email protected].4
4343
with:
4444
path: venv
4545
key: >-
@@ -59,7 +59,7 @@ jobs:
5959
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
6060
- name: Restore pre-commit environment
6161
id: cache-precommit
62-
uses: actions/[email protected].3
62+
uses: actions/[email protected].4
6363
with:
6464
path: ${{ env.PRE_COMMIT_CACHE }}
6565
key: >-
@@ -72,7 +72,7 @@ jobs:
7272
- name: Run pre-commit checks
7373
run: |
7474
. venv/bin/activate
75-
pre-commit run pylint --all-files
75+
pre-commit run --hook-stage manual pylint-ci --all-files
7676
7777
tests-linux:
7878
name: tests / run / ${{ matrix.python-version }} / Linux
@@ -86,7 +86,7 @@ jobs:
8686
python-key: ${{ steps.generate-python-key.outputs.key }}
8787
steps:
8888
- name: Check out code from GitHub
89-
uses: actions/checkout@v4.2.2
89+
uses: actions/checkout@v5.0.0
9090
- name: Set up Python ${{ matrix.python-version }}
9191
id: python
9292
uses: actions/[email protected]
@@ -106,7 +106,7 @@ jobs:
106106
'requirements_full.txt', 'requirements_minimal.txt') }}" >> $GITHUB_OUTPUT
107107
- name: Restore Python virtual environment
108108
id: cache-venv
109-
uses: actions/[email protected].3
109+
uses: actions/[email protected].4
110110
with:
111111
path: venv
112112
key: >-
@@ -146,7 +146,7 @@ jobs:
146146
# Workaround to set correct temp directory on Windows
147147
# https://github.com/actions/virtual-environments/issues/712
148148
- name: Check out code from GitHub
149-
uses: actions/checkout@v4.2.2
149+
uses: actions/checkout@v5.0.0
150150
- name: Set up Python ${{ matrix.python-version }}
151151
id: python
152152
uses: actions/[email protected]
@@ -161,7 +161,7 @@ jobs:
161161
'requirements_full.txt', 'requirements_minimal.txt') }}" >> $GITHUB_OUTPUT
162162
- name: Restore Python virtual environment
163163
id: cache-venv
164-
uses: actions/[email protected].3
164+
uses: actions/[email protected].4
165165
with:
166166
path: venv
167167
key: >-
@@ -197,7 +197,7 @@ jobs:
197197
python-version: ["pypy3.10"]
198198
steps:
199199
- name: Check out code from GitHub
200-
uses: actions/checkout@v4.2.2
200+
uses: actions/checkout@v5.0.0
201201
- name: Set up Python ${{ matrix.python-version }}
202202
id: python
203203
uses: actions/[email protected]
@@ -212,7 +212,7 @@ jobs:
212212
}}" >> $GITHUB_OUTPUT
213213
- name: Restore Python virtual environment
214214
id: cache-venv
215-
uses: actions/[email protected].3
215+
uses: actions/[email protected].4
216216
with:
217217
path: venv
218218
key: >-
@@ -244,7 +244,7 @@ jobs:
244244
needs: ["tests-linux", "tests-windows", "tests-pypy"]
245245
steps:
246246
- name: Check out code from GitHub
247-
uses: actions/checkout@v4.2.2
247+
uses: actions/checkout@v5.0.0
248248
- name: Set up Python 3.13
249249
id: python
250250
uses: actions/[email protected]
@@ -254,7 +254,7 @@ jobs:
254254
- name: Install dependencies
255255
run: pip install -U -r requirements_minimal.txt
256256
- name: Download all coverage artifacts
257-
uses: actions/download-artifact@v4.3.0
257+
uses: actions/download-artifact@v5.0.0
258258
- name: Combine Linux coverage results
259259
run: |
260260
coverage combine coverage-linux*/.coverage

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@v4.2.2
49+
uses: actions/checkout@v5.0.0
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: github.event_name == 'release'
1919
steps:
2020
- name: Check out code from Github
21-
uses: actions/checkout@v4.2.2
21+
uses: actions/checkout@v5.0.0
2222
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2323
id: python
2424
uses: actions/[email protected]
@@ -50,7 +50,7 @@ jobs:
5050
id-token: write
5151
steps:
5252
- name: Download release assets
53-
uses: actions/download-artifact@v4.3.0
53+
uses: actions/download-artifact@v5.0.0
5454
with:
5555
name: release-assets
5656
path: dist/
@@ -67,7 +67,7 @@ jobs:
6767
id-token: write
6868
steps:
6969
- name: Download release assets
70-
uses: actions/download-artifact@v4.3.0
70+
uses: actions/download-artifact@v5.0.0
7171
with:
7272
name: release-assets
7373
path: dist/

.pre-commit-config.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ ci:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v5.0.0
6+
rev: v6.0.0
77
hooks:
88
- id: trailing-whitespace
99
exclude: .github/|tests/testdata
1010
- id: end-of-file-fixer
1111
exclude: tests/testdata
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: "v0.12.4"
13+
rev: "v0.12.8"
1414
hooks:
1515
- id: ruff-check
1616
args: ["--fix"]
@@ -41,6 +41,20 @@ repos:
4141
- repo: local
4242
hooks:
4343
- id: pylint
44+
name: pylint
45+
entry: pylint
46+
language: system
47+
types: [python]
48+
args: [
49+
"-rn",
50+
"-sn",
51+
"--rcfile=pylintrc",
52+
# "--load-plugins=pylint.extensions.docparams", We're not ready for that
53+
]
54+
# We define an additional manual step to allow running pylint
55+
# with the proper output for CI.
56+
- id: pylint
57+
alias: pylint-ci
4458
name: pylint
4559
entry: pylint
4660
language: system
@@ -52,8 +66,9 @@ repos:
5266
"--output-format=github",
5367
# "--load-plugins=pylint.extensions.docparams", We're not ready for that
5468
]
69+
stages: [manual]
5570
- repo: https://github.com/pre-commit/mirrors-mypy
56-
rev: v1.17.0
71+
rev: v1.17.1
5772
hooks:
5873
- id: mypy
5974
language: python

ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Release date: TBA
1111

1212
Closes pylint-dev/pylint#9056
1313

14+
* Fix crash when comparing invalid dict literal
15+
16+
Closes #2522
17+
1418
* Removed internal functions ``infer_numpy_member``, ``name_looks_like_numpy_member``, and
1519
``attribute_looks_like_numpy_member`` from ``astroid.brain.brain_numpy_utils``.
1620

@@ -56,6 +60,15 @@ Release date: TBA
5660

5761
Closes #2672
5862

63+
* Add basic support for ``ast.TemplateStr`` and ``ast.Interpolation``added in Python 3.14.
64+
65+
refs #2789
66+
67+
* Add support for type parameter defaults added in Python 3.13.
68+
69+
* Improve ``as_string()`` representation for ``TypeVar``, ``ParamSpec`` and ``TypeVarTuple`` nodes, as well as
70+
type parameter in ``ClassDef``, ``FuncDef`` and ``TypeAlias`` nodes (PEP 695).
71+
5972

6073
What's New in astroid 3.3.11?
6174
=============================

astroid/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
IfExp,
123123
Import,
124124
ImportFrom,
125+
Interpolation,
125126
JoinedStr,
126127
Keyword,
127128
Lambda,
@@ -151,6 +152,7 @@
151152
Slice,
152153
Starred,
153154
Subscript,
155+
TemplateStr,
154156
Try,
155157
TryStar,
156158
Tuple,

astroid/__pkginfo__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE
33
# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt
44

5-
__version__ = "4.0.0-a1"
5+
__version__ = "4.0.0b3-dev0"
66
version = __version__

astroid/brain/brain_typing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ def __class_getitem__(cls, item): return cls
470470
if PY314_PLUS:
471471
code += textwrap.dedent(
472472
"""
473+
from annotationlib import ForwardRef
473474
class Union:
474475
@classmethod
475476
def __class_getitem__(cls, item): return cls

astroid/nodes/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
IfExp,
5151
Import,
5252
ImportFrom,
53+
Interpolation,
5354
JoinedStr,
5455
Keyword,
5556
List,
@@ -76,6 +77,7 @@
7677
Slice,
7778
Starred,
7879
Subscript,
80+
TemplateStr,
7981
Try,
8082
TryStar,
8183
Tuple,
@@ -247,6 +249,7 @@
247249
"IfExp",
248250
"Import",
249251
"ImportFrom",
252+
"Interpolation",
250253
"JoinedStr",
251254
"Keyword",
252255
"Lambda",
@@ -278,6 +281,7 @@
278281
"Slice",
279282
"Starred",
280283
"Subscript",
284+
"TemplateStr",
281285
"Try",
282286
"TryStar",
283287
"Tuple",

0 commit comments

Comments
 (0)