Skip to content

Commit 625ca73

Browse files
Merge branch 'main' into super-crash
2 parents cac100f + a67ffbd commit 625ca73

File tree

111 files changed

+1131
-258
lines changed

Some content is hidden

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

111 files changed

+1131
-258
lines changed

.github/workflows/changelog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 0
2929
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3030
id: python
31-
uses: actions/[email protected].0
31+
uses: actions/[email protected].1
3232
with:
3333
python-version: ${{ env.DEFAULT_PYTHON }}
3434
check-latest: true

.github/workflows/checks.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/[email protected]
3737
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3838
id: python
39-
uses: actions/[email protected].0
39+
uses: actions/[email protected].1
4040
with:
4141
python-version: ${{ env.DEFAULT_PYTHON }}
4242
check-latest: true
@@ -91,7 +91,7 @@ jobs:
9191
uses: actions/[email protected]
9292
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
9393
id: python
94-
uses: actions/[email protected].0
94+
uses: actions/[email protected].1
9595
with:
9696
python-version: ${{ env.DEFAULT_PYTHON }}
9797
check-latest: true
@@ -132,7 +132,7 @@ jobs:
132132
uses: actions/[email protected]
133133
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
134134
id: python
135-
uses: actions/[email protected].0
135+
uses: actions/[email protected].1
136136
with:
137137
python-version: ${{ env.DEFAULT_PYTHON }}
138138
check-latest: true
@@ -160,7 +160,7 @@ jobs:
160160
uses: actions/[email protected]
161161
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
162162
id: python
163-
uses: actions/[email protected].0
163+
uses: actions/[email protected].1
164164
with:
165165
python-version: ${{ env.DEFAULT_PYTHON }}
166166
check-latest: true

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ concurrency:
2929

3030
jobs:
3131
analyze:
32+
if:
33+
${{ github.repository_owner == 'pylint-dev' || github.event_name != 'schedule' }}
3234
name: Analyze
3335
runs-on: ubuntu-latest
3436
permissions:

.github/workflows/primer-test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/[email protected]
3939
- name: Set up Python ${{ matrix.python-version }}
4040
id: python
41-
uses: actions/[email protected].0
41+
uses: actions/[email protected].1
4242
with:
4343
python-version: ${{ matrix.python-version }}
4444
check-latest: true
@@ -78,7 +78,7 @@ jobs:
7878
uses: actions/[email protected]
7979
- name: Set up Python ${{ matrix.python-version }}
8080
id: python
81-
uses: actions/[email protected].0
81+
uses: actions/[email protected].1
8282
with:
8383
python-version: ${{ matrix.python-version }}
8484
check-latest: true

.github/workflows/primer_comment.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/[email protected]
3434
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3535
id: python
36-
uses: actions/[email protected].0
36+
uses: actions/[email protected].1
3737
with:
3838
python-version: ${{ env.DEFAULT_PYTHON }}
3939
check-latest: true
@@ -103,8 +103,9 @@ jobs:
103103
. venv/bin/activate
104104
python tests/primer/__main__.py compare \
105105
--commit=${{ github.event.workflow_run.head_sha }} \
106-
--base-file=output_${{ steps.python.outputs.python-version }}_main.txt \
107-
--new-file=output_${{ steps.python.outputs.python-version }}_pr.txt
106+
--base-file=output_${{ steps.python.outputs.python-version }}_main_BATCHIDX.txt \
107+
--new-file=output_${{ steps.python.outputs.python-version }}_pr_BATCHIDX.txt \
108+
--batches=4
108109
- name: Post comment
109110
id: post-comment
110111
uses: actions/[email protected]

.github/workflows/primer_run_main.yaml

+10-5
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,20 @@ permissions:
2424

2525
jobs:
2626
run-primer:
27-
name: Run / ${{ matrix.python-version }}
27+
name: Run / ${{ matrix.python-version }} / batch index ${{ matrix.batchIdx }}
2828
runs-on: ubuntu-latest
29-
timeout-minutes: 120
29+
timeout-minutes: 45
3030
strategy:
3131
matrix:
3232
python-version: ["3.8", "3.11"]
33+
batches: [4]
34+
batchIdx: [0, 1, 2, 3]
3335
steps:
3436
- name: Check out code from GitHub
3537
uses: actions/[email protected]
3638
- name: Set up Python ${{ matrix.python-version }}
3739
id: python
38-
uses: actions/[email protected].0
40+
uses: actions/[email protected].1
3941
with:
4042
python-version: ${{ matrix.python-version }}
4143
check-latest: true
@@ -91,7 +93,10 @@ jobs:
9193
run: |
9294
. venv/bin/activate
9395
pip install -e .
94-
python tests/primer/__main__.py run --type=main 2>warnings.txt
96+
python tests/primer/__main__.py run --type=main --batches=${{ matrix.batches }} --batchIdx=${{ matrix.batchIdx }} 2>warnings.txt
97+
- name: Echo warnings
98+
if: success() || failure()
99+
run: |
95100
WARNINGS=$(head -c 65000 < warnings.txt)
96101
if [[ $WARNINGS ]]
97102
then echo "::warning ::$WARNINGS"
@@ -102,4 +107,4 @@ jobs:
102107
name: primer_output
103108
path: >-
104109
tests/.pylint_primer_tests/output_${{ steps.python.outputs.python-version
105-
}}_main.txt
110+
}}_main_batch${{ matrix.batchIdx }}.txt

.github/workflows/primer_run_pr.yaml

+13-6
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,22 @@ permissions:
3333

3434
jobs:
3535
run-primer:
36-
name: Run / ${{ matrix.python-version }}
36+
name: Run / ${{ matrix.python-version }} / batch index ${{ matrix.batchIdx }}
3737
runs-on: ubuntu-latest
38-
timeout-minutes: 120
38+
timeout-minutes: 45
3939
strategy:
4040
matrix:
4141
python-version: ["3.8", "3.11"]
42+
batches: [4]
43+
batchIdx: [0, 1, 2, 3]
4244
steps:
4345
- name: Check out code from GitHub
4446
uses: actions/[email protected]
4547
with:
4648
fetch-depth: 0
4749
- name: Set up Python ${{ matrix.python-version }}
4850
id: python
49-
uses: actions/[email protected].0
51+
uses: actions/[email protected].1
5052
with:
5153
python-version: ${{ matrix.python-version }}
5254
check-latest: true
@@ -156,7 +158,10 @@ jobs:
156158
run: |
157159
. venv/bin/activate
158160
pip install -e .
159-
python tests/primer/__main__.py run --type=pr 2>warnings.txt
161+
python tests/primer/__main__.py run --type=pr --batches=${{ matrix.batches }} --batchIdx=${{ matrix.batchIdx }} 2>warnings.txt
162+
- name: Echo warnings
163+
if: success() || failure()
164+
run: |
160165
WARNINGS=$(head -c 65000 < warnings.txt)
161166
if [[ $WARNINGS ]]
162167
then echo "::warning ::$WARNINGS"
@@ -167,12 +172,14 @@ jobs:
167172
name: primer_output_pr
168173
path:
169174
tests/.pylint_primer_tests/output_${{ steps.python.outputs.python-version
170-
}}_pr.txt
175+
}}_pr_batch${{ matrix.batchIdx }}.txt
171176
- name: Upload output of 'main'
172177
uses: actions/[email protected]
173178
with:
174179
name: primer_output_main
175-
path: output_${{ steps.python.outputs.python-version }}_main.txt
180+
path:
181+
output_${{ steps.python.outputs.python-version }}_main_batch${{
182+
matrix.batchIdx }}.txt
176183

177184
# Save PR number so we know which PR to comment on
178185
- name: Save PR number

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/[email protected]
2424
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2525
id: python
26-
uses: actions/[email protected].0
26+
uses: actions/[email protected].1
2727
with:
2828
python-version: ${{ env.DEFAULT_PYTHON }}
2929
check-latest: true

.github/workflows/stale.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: close stale issues and pr
2+
on:
3+
schedule:
4+
- cron: "30 1 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
close-issues:
9+
if: github.repository_owner == 'pylint-dev'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
steps:
15+
- uses: actions/stale@v8
16+
with:
17+
days-before-issue-stale: 28
18+
days-before-issue-close: 7
19+
any-of-issue-labels:
20+
"Waiting on author,Cannot reproduce 🤷,python past end of life,Won't fix/not
21+
planned"
22+
exempt-issue-labels: "High priority,Blocked 🚧,Needs decision 🔒"
23+
stale-issue-message:
24+
"This issue is stale because it has been open 4 weeks with no activity.
25+
Remove 'Stale' label or comment or this will be closed in a week."
26+
close-issue-message:
27+
"This issue was closed because it has been stalled for five weeks with no
28+
activity."
29+
30+
any-of-pr-labels:
31+
"Waiting on author,python past end of life,Won't fix/not planned"
32+
exempt-pr-labels: "High priority,Blocked 🚧,Needs review 🔍"
33+
days-before-pr-stale: 56
34+
days-before-pr-close: -1
35+
stale-pr-label: "Needs take over 🛎️"
36+
close-pr-message:
37+
"This PR was closed because it needed to be taken over for 16 weeks with no
38+
one stepping up."
39+
stale-pr-message:
40+
"This PR needs take over because because it has been open 8 weeks with no
41+
activity."

.github/workflows/tests.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/[email protected]
4040
- name: Set up Python ${{ matrix.python-version }}
4141
id: python
42-
uses: actions/[email protected].0
42+
uses: actions/[email protected].1
4343
with:
4444
python-version: ${{ matrix.python-version }}
4545
check-latest: true
@@ -91,7 +91,7 @@ jobs:
9191
uses: actions/[email protected]
9292
- name: Set up Python 3.11
9393
id: python
94-
uses: actions/[email protected].0
94+
uses: actions/[email protected].1
9595
with:
9696
python-version: "3.11"
9797
check-latest: true
@@ -131,7 +131,7 @@ jobs:
131131
uses: actions/[email protected]
132132
- name: Set up Python ${{ matrix.python-version }}
133133
id: python
134-
uses: actions/[email protected].0
134+
uses: actions/[email protected].1
135135
with:
136136
python-version: ${{ matrix.python-version }}
137137
check-latest: true
@@ -185,7 +185,7 @@ jobs:
185185
uses: actions/[email protected]
186186
- name: Set up Python ${{ matrix.python-version }}
187187
id: python
188-
uses: actions/[email protected].0
188+
uses: actions/[email protected].1
189189
with:
190190
python-version: ${{ matrix.python-version }}
191191
check-latest: true
@@ -231,7 +231,7 @@ jobs:
231231
uses: actions/[email protected]
232232
- name: Set up Python ${{ matrix.python-version }}
233233
id: python
234-
uses: actions/[email protected].0
234+
uses: actions/[email protected].1
235235
with:
236236
python-version: ${{ matrix.python-version }}
237237
check-latest: true
@@ -275,7 +275,7 @@ jobs:
275275
uses: actions/[email protected]
276276
- name: Set up Python ${{ matrix.python-version }}
277277
id: python
278-
uses: actions/[email protected].0
278+
uses: actions/[email protected].1
279279
with:
280280
python-version: ${{ matrix.python-version }}
281281
check-latest: true

.pre-commit-config.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@ repos:
1616
doc/data/messages/m/missing-final-newline/bad.py|
1717
)$
1818
- repo: https://github.com/charliermarsh/ruff-pre-commit
19-
rev: "v0.0.265"
19+
rev: "v0.0.270"
2020
hooks:
2121
- id: ruff
2222
args: ["--fix"]
2323
exclude: &fixtures tests(/\w*)*/functional/|tests/input|doc/data/messages|tests(/\w*)*data/
24-
- repo: https://github.com/charliermarsh/ruff-pre-commit
25-
rev: "v0.0.265"
26-
hooks:
2724
- id: ruff
2825
name: ruff-doc
2926
files: doc/data/messages
@@ -112,7 +109,7 @@ repos:
112109
files: ^(doc/(.*/)*.*\.rst)
113110
additional_dependencies: [Sphinx==5.0.1]
114111
- repo: https://github.com/pre-commit/mirrors-mypy
115-
rev: v1.2.0
112+
rev: v1.3.0
116113
hooks:
117114
- id: mypy
118115
name: mypy

.pyenchant_pylint_custom_dict.txt

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ async
2121
asynccontextmanager
2222
attr
2323
attrib
24+
attrname
2425
backport
2526
BaseChecker
2627
basename
@@ -72,6 +73,7 @@ CVE
7273
cwd
7374
cyclomatic
7475
dataclass
76+
dataclasses
7577
datetime
7678
debian
7779
deduplication

doc/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"sphinx.ext.autosectionlabel",
4444
"sphinx.ext.intersphinx",
4545
"sphinx_reredirects",
46-
"myst_parser",
4746
]
4847

4948

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from dataclasses import dataclass, field
2+
3+
4+
@dataclass
5+
class C:
6+
a: float
7+
b: float
8+
c: float
9+
10+
field(init=False) # [invalid-field-call]
11+
12+
def __post_init__(self):
13+
self.c = self.a + self.b
14+
15+
16+
print(field(init=False)) # [invalid-field-call]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from dataclasses import dataclass, field, make_dataclass
2+
3+
C = make_dataclass(
4+
"C",
5+
[("x", int), "y", ("z", int, field(default=5))],
6+
namespace={"add_one": lambda self: self.x + 1},
7+
)
8+
9+
10+
@dataclass
11+
class C:
12+
a: float
13+
b: float
14+
c: float = field(init=False)
15+
16+
def __post_init__(self):
17+
self.c = self.a + self.b
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def print_name(name="Sarah", /, **kwds):
2+
print(name)
3+
4+
5+
print_name(name="Jacob") # [kwarg-superseded-by-positional-arg]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def print_name(name="Sarah", /, **kwds):
2+
print(name)
3+
4+
5+
print_name("Jacob")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from collections import namedtuple
2+
3+
Philosophy = namedtuple( # [prefer-typing-namedtuple]
4+
"Philosophy", ("goodness", "truth", "beauty")
5+
)

0 commit comments

Comments
 (0)