Skip to content

Commit 54d83b4

Browse files
Merge branch 'maintenance/3.3.x'
2 parents 8fd96fa + 4cab7ca commit 54d83b4

File tree

8 files changed

+64
-4
lines changed

8 files changed

+64
-4
lines changed

doc/whatsnew/3/3.3/index.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,45 @@ Summary -- Release highlights
1414

1515
.. towncrier release notes start
1616
17+
What's new in Pylint 3.3.9?
18+
---------------------------
19+
Release date: 2025-10-05
20+
21+
22+
False Positives Fixed
23+
---------------------
24+
25+
- Fix used-before-assignment for PEP 695 type aliases and parameters.
26+
27+
Closes #9815 (`#9815 <https://github.com/pylint-dev/pylint/issues/9815>`_)
28+
29+
- No longer flag undeprecated functions in ``importlib.resources`` as deprecated.
30+
31+
Closes #10593 (`#10593 <https://github.com/pylint-dev/pylint/issues/10593>`_)
32+
33+
- Fix false positive ``inconsistent-return-statements`` when using ``quit()`` or ``exit()`` functions.
34+
35+
Closes #10508 (`#10508 <https://github.com/pylint-dev/pylint/issues/10508>`_)
36+
37+
- Fix false positive ``undefined-variable`` (E0602) for for-loop variable shadowing patterns like ``for item in item:`` when the variable was previously defined.
38+
39+
Closes #10562 (`#10562 <https://github.com/pylint-dev/pylint/issues/10562>`_)
40+
41+
42+
43+
Other Bug Fixes
44+
---------------
45+
46+
- Fixed crash in ``unnecessary-list-index-lookup`` when starting an enumeration using
47+
minus the length of an iterable inside a dict comprehension when the len call was only
48+
made in this dict comprehension, and not elsewhere. Also changed the approach,
49+
to use inference in all cases but the simple ones, so we don't have to fix crashes
50+
one by one for arbitrarily complex expressions in enumerate.
51+
52+
Closes #10510 (`#10510 <https://github.com/pylint-dev/pylint/issues/10510>`_)
53+
54+
55+
1756
What's new in Pylint 3.3.8?
1857
---------------------------
1958
Release date: 2025-08-09

examples/pylintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,9 @@ disable=raw-checker-failed,
432432
suppressed-message,
433433
useless-suppression,
434434
deprecated-pragma,
435+
use-symbolic-message-instead,
435436
use-implicit-booleaness-not-comparison-to-string,
436-
use-implicit-booleaness-not-comparison-to-zero,
437-
use-symbolic-message-instead
437+
use-implicit-booleaness-not-comparison-to-zero
438438

439439
# Enable the message, report, category or checker with the given id(s). You can
440440
# either give multiple identifier separated by comma (,) or put this option

examples/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ disable = [
377377
"suppressed-message",
378378
"useless-suppression",
379379
"deprecated-pragma",
380+
"use-symbolic-message-instead",
380381
"use-implicit-booleaness-not-comparison-to-string",
381382
"use-implicit-booleaness-not-comparison-to-zero",
382-
"use-symbolic-message-instead",
383383
]
384384

385385
# Enable the message, report, category or checker with the given id(s). You can

pylint/testutils/functional/find_functional_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"ext",
2525
"regression",
2626
"regression_02",
27+
"used_02",
2728
}
2829
"""Direct parent directories that should be ignored."""
2930

script/.contributors_aliases.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@
282282
"66853113+pre-commit-ci[bot]@users.noreply.github.com",
283283
"49699333+dependabot[bot]@users.noreply.github.com",
284284
"212256041+pylint-backport-bot[bot]@users.noreply.github.com",
285-
"41898282+github-actions[bot]@users.noreply.github.com"
285+
"41898282+github-actions[bot]@users.noreply.github.com",
286+
"212256041+pylint-backport[bot]@users.noreply.github.com"
286287
],
287288
"name": "bot"
288289
},
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""Tests for used-before-assignment with Python 3.13 type var defaults (PEP 696)"""
2+
# pylint: disable=missing-docstring,unused-argument,too-few-public-methods
3+
4+
from typing import TYPE_CHECKING
5+
6+
if TYPE_CHECKING:
7+
class Y: ...
8+
9+
class Good1[T = Y]: ...
10+
class Good2[*Ts = tuple[int, Y]]: ...
11+
class Good3[**P = [int, Y]]: ...
12+
type Alias[T = Y] = T | None
13+
14+
# https://github.com/pylint-dev/pylint/issues/9884
15+
def func[T = Y](x: T) -> None: # [redefined-outer-name] FALSE POSITIVE
16+
...
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[testoptions]
2+
min_pyver=3.13
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
redefined-outer-name:15:9:15:14:func:Redefining name 'T' from outer scope (line 12):UNDEFINED

0 commit comments

Comments
 (0)