Skip to content

Commit a1cffc8

Browse files
Merge branch 'main' into main
2 parents 1c49399 + 3570860 commit a1cffc8

File tree

1,296 files changed

+16348
-8769
lines changed

Some content is hidden

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

1,296 files changed

+16348
-8769
lines changed

.coveragerc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ include =
77
pylint/*
88
omit =
99
*/test/*
10-
# TODO: 3.0: Remove these after these files have been removed
11-
pylint/config/configuration_mixin.py
12-
pylint/config/option.py
13-
pylint/config/option_manager_mixin.py
14-
pylint/config/option_parser.py
15-
pylint/config/options_provider_mixin.py
1610
exclude_lines =
1711
# Re-enable default pragma
1812
pragma: no cover

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text=auto
2+
tests/**/functional/** -text
3+
tests/input/** -text
4+
tests/**/data/** -text
5+
tests/regrtest_data/** -text
6+
doc/data/messages/u/unexpected-line-ending-format/bad.py -text

.github/CODEOWNERS

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pylint/message/* @pierre-sassoulas
1414
tests/message/* @pierre-sassoulas
1515

1616
# typing
17-
pylint/typing.py @DanielNoord @cdce8p
17+
pylint/typing.py @DanielNoord
1818

1919
# multiprocessing (doublethefish is not yet a contributor with write access)
2020
# pylint/lint/parallel.py @doublethefish
@@ -26,11 +26,10 @@ tests/pyreverse/* @DudeNr33
2626

2727
### Extensions
2828

29-
# For any all
30-
pylint/extensions/for_any_all.py @areveny
31-
tests/functional/ext/for_any_all/* @areveny
29+
# CodeStyle
30+
pylint/extensions/code_style.* @cdce8p
31+
tests/functional/ext/code_style/* @cdce8p
3232

33-
# Private import
34-
pylint/extensions/private_import.py @areveny
35-
tests/extensions/test_private_import.py @areveny
36-
tests/functional/ext/private_import/* @areveny
33+
# Typing
34+
pylint/extensions/typing.* @cdce8p
35+
tests/functional/ext/typing/* @cdce8p

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Please read the
2-
[contribute doc](https://pylint.pycqa.org/en/latest/development_guide/contributor_guide/contribute.html).
2+
[contribute doc](https://pylint.readthedocs.io/en/latest/development_guide/contributor_guide/contribute.html).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@ Thank you for submitting a PR to pylint!
33
44
To ease the process of reviewing your PR, do make sure to complete the following boxes.
55
6-
- [ ] Write a good description on what the PR does.
7-
- [ ] Create a news fragment with `towncrier create <IssueNumber>.<type>` which will be
8-
included in the changelog. `<type>` can be one of: new_check, removed_check, extension,
9-
false_positive, false_negative, bugfix, other, internal. If necessary you can write
10-
details or offer examples on how the new change is supposed to work.
6+
- [ ] Document your change, if it is a non-trivial one.
7+
- A maintainer might label the issue ``skip-news`` if the change does not need to be in the changelog.
8+
- Otherwise, create a news fragment with ``towncrier create <IssueNumber>.<type>`` which will be
9+
included in the changelog. ``<type>`` can be one of the types defined in `./towncrier.toml`.
10+
If necessary you can write details or offer examples on how the new change is supposed to work.
11+
- Generating the doc is done with ``tox -e docs``
12+
- [ ] Relate your change to an issue in the tracker if such an issue exists (Refs #1234, Closes #1234)
13+
- [ ] Write comprehensive commit messages and/or a good description of what the PR does.
14+
- [ ] Keep the change small, separate the consensual changes from the opinionated one.
15+
Don't hesitate to open multiple PRs if the change requires it. If your review is so
16+
big it requires to actually plan and allocate time to review, it's more likely
17+
that it's going to go stale.
1118
- [ ] If you used multiple emails or multiple names when contributing, add your mails
1219
and preferred name in ``script/.contributors_aliases.json``
1320
-->

.github/workflows/backport.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
backport:
14+
name: Backport
15+
runs-on: ubuntu-latest
16+
# Only react to merged PRs for security reasons.
17+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
18+
if: >
19+
github.event.pull_request.merged && (
20+
github.event.action == 'closed'
21+
|| (
22+
github.event.action == 'labeled'
23+
&& contains(github.event.label.name, 'backport')
24+
)
25+
)
26+
steps:
27+
- uses: tibdex/backport@2e217641d82d02ba0603f46b1aeedefb258890ac # v2.0.3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/changelog.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ name: changelog
33
on:
44
pull_request:
55
types: [opened, synchronize, labeled, unlabeled, reopened]
6-
6+
branches-ignore:
7+
- "maintenance/**"
78
env:
8-
# Also change CACHE_VERSION in the other workflows
9-
CACHE_VERSION: 24
10-
DEFAULT_PYTHON: "3.10"
9+
CACHE_VERSION: 1
10+
KEY_PREFIX: base-venv
11+
DEFAULT_PYTHON: "3.11"
12+
13+
permissions:
14+
contents: read
1115

1216
jobs:
1317
check-changelog:
@@ -17,32 +21,32 @@ jobs:
1721
timeout-minutes: 10
1822
steps:
1923
- name: Check out code from GitHub
20-
uses: actions/checkout@v3.0.2
24+
uses: actions/checkout@v3.4.0
2125
with:
2226
# `towncrier check` runs `git diff --name-only origin/main...`, which
2327
# needs a non-shallow clone.
2428
fetch-depth: 0
2529
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2630
id: python
27-
uses: actions/setup-python@v4.2.0
31+
uses: actions/setup-python@v4.5.0
2832
with:
2933
python-version: ${{ env.DEFAULT_PYTHON }}
34+
check-latest: true
3035
- name: Generate partial Python venv restore key
3136
id: generate-python-key
3237
run: >-
33-
echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
34-
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt')
35-
}}"
38+
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
39+
hashFiles('pyproject.toml', 'requirements_test.txt',
40+
'requirements_test_min.txt', 'requirements_test_pre_commit.txt') }}" >>
41+
$GITHUB_OUTPUT
3642
- name: Restore Python virtual environment
3743
id: cache-venv
38-
uses: actions/cache@v3.0.8
44+
uses: actions/cache@v3.3.1
3945
with:
4046
path: venv
4147
key: >-
4248
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
4349
steps.generate-python-key.outputs.key }}
44-
restore-keys: |
45-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
4650
- name: Create Python virtual environment
4751
if: steps.cache-venv.outputs.cache-hit != 'true'
4852
run: |

.github/workflows/checks.yaml

Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,25 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.*
8-
pull_request: ~
7+
- "maintenance/**"
8+
pull_request:
9+
branches:
10+
- main
11+
- "maintenance/**"
912

1013
env:
11-
CACHE_VERSION: 24
12-
DEFAULT_PYTHON: "3.10"
14+
CACHE_VERSION: 1
15+
KEY_PREFIX: base-venv
16+
DEFAULT_PYTHON: "3.11"
1317
PRE_COMMIT_CACHE: ~/.cache/pre-commit
1418

1519
concurrency:
1620
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1721
cancel-in-progress: true
1822

23+
permissions:
24+
contents: read
25+
1926
jobs:
2027
prepare-base:
2128
name: Prepare base dependencies
@@ -26,28 +33,28 @@ jobs:
2633
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
2734
steps:
2835
- name: Check out code from GitHub
29-
uses: actions/checkout@v3.0.2
36+
uses: actions/checkout@v3.4.0
3037
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3138
id: python
32-
uses: actions/setup-python@v4.2.0
39+
uses: actions/setup-python@v4.5.0
3340
with:
3441
python-version: ${{ env.DEFAULT_PYTHON }}
42+
check-latest: true
3543
- name: Generate partial Python venv restore key
3644
id: generate-python-key
3745
run: >-
38-
echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
39-
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt')
40-
}}"
46+
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
47+
hashFiles('pyproject.toml', 'requirements_test.txt',
48+
'requirements_test_min.txt', 'requirements_test_pre_commit.txt') }}" >>
49+
$GITHUB_OUTPUT
4150
- name: Restore Python virtual environment
4251
id: cache-venv
43-
uses: actions/cache@v3.0.8
52+
uses: actions/cache@v3.3.1
4453
with:
4554
path: venv
4655
key: >-
4756
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
4857
steps.generate-python-key.outputs.key }}
49-
restore-keys: |
50-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
5158
- name: Create Python virtual environment
5259
if: steps.cache-venv.outputs.cache-hit != 'true'
5360
run: |
@@ -59,17 +66,15 @@ jobs:
5966
- name: Generate pre-commit restore key
6067
id: generate-pre-commit-key
6168
run: >-
62-
echo "::set-output name=key::pre-commit-${{ env.CACHE_VERSION }}-${{
63-
hashFiles('.pre-commit-config.yaml') }}"
69+
echo "key=pre-commit-${{ env.CACHE_VERSION }}-${{
70+
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
6471
- name: Restore pre-commit environment
6572
id: cache-precommit
66-
uses: actions/cache@v3.0.8
73+
uses: actions/cache@v3.3.1
6774
with:
6875
path: ${{ env.PRE_COMMIT_CACHE }}
6976
key: >-
7077
${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
71-
restore-keys: |
72-
${{ runner.os }}-pre-commit-${{ env.CACHE_VERSION }}-
7378
- name: Install pre-commit dependencies
7479
if: steps.cache-precommit.outputs.cache-hit != 'true'
7580
run: |
@@ -83,44 +88,38 @@ jobs:
8388
needs: prepare-base
8489
steps:
8590
- name: Check out code from GitHub
86-
uses: actions/checkout@v3.0.2
91+
uses: actions/checkout@v3.4.0
8792
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
8893
id: python
89-
uses: actions/setup-python@v4.2.0
94+
uses: actions/setup-python@v4.5.0
9095
with:
9196
python-version: ${{ env.DEFAULT_PYTHON }}
97+
check-latest: true
9298
- name: Restore Python virtual environment
9399
id: cache-venv
94-
uses: actions/cache@v3.0.8
100+
uses: actions/cache@v3.3.1
95101
with:
96102
path: venv
103+
fail-on-cache-miss: true
97104
key:
98105
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
99106
needs.prepare-base.outputs.python-key }}
100-
- name: Fail job if Python cache restore failed
101-
if: steps.cache-venv.outputs.cache-hit != 'true'
102-
run: |
103-
echo "Failed to restore Python venv from cache"
104-
exit 1
105107
- name: Restore pre-commit environment
106108
id: cache-precommit
107-
uses: actions/cache@v3.0.8
109+
uses: actions/cache@v3.3.1
108110
with:
109111
path: ${{ env.PRE_COMMIT_CACHE }}
112+
fail-on-cache-miss: true
110113
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
111-
- name: Fail job if pre-commit cache restore failed
112-
if: steps.cache-precommit.outputs.cache-hit != 'true'
113-
run: |
114-
echo "Failed to restore pre-commit environment from cache"
115-
exit 1
116114
- name: Install enchant and aspell
117115
run: |
118116
sudo apt-get update
119-
sudo apt-get install enchant aspell-en
117+
sudo apt-get install enchant-2 aspell-en
120118
- name: Run pylint checks
121119
run: |
122120
. venv/bin/activate
123121
pip install -e .
122+
pip list | grep 'astroid\|pylint'
124123
pre-commit run --hook-stage manual pylint-with-spelling --all-files
125124
126125
spelling:
@@ -130,25 +129,22 @@ jobs:
130129
needs: prepare-base
131130
steps:
132131
- name: Check out code from GitHub
133-
uses: actions/checkout@v3.0.2
132+
uses: actions/checkout@v3.4.0
134133
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
135134
id: python
136-
uses: actions/setup-python@v4.2.0
135+
uses: actions/setup-python@v4.5.0
137136
with:
138137
python-version: ${{ env.DEFAULT_PYTHON }}
138+
check-latest: true
139139
- name: Restore Python virtual environment
140140
id: cache-venv
141-
uses: actions/cache@v3.0.8
141+
uses: actions/cache@v3.3.1
142142
with:
143143
path: venv
144+
fail-on-cache-miss: true
144145
key:
145146
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
146147
needs.prepare-base.outputs.python-key }}
147-
- name: Fail job if Python cache restore failed
148-
if: steps.cache-venv.outputs.cache-hit != 'true'
149-
run: |
150-
echo "Failed to restore Python venv from cache"
151-
exit 1
152148
- name: Run spelling checks
153149
run: |
154150
. venv/bin/activate
@@ -157,29 +153,26 @@ jobs:
157153
documentation:
158154
name: documentation
159155
runs-on: ubuntu-latest
160-
timeout-minutes: 10
156+
timeout-minutes: 20
161157
needs: prepare-base
162158
steps:
163159
- name: Check out code from GitHub
164-
uses: actions/checkout@v3.0.2
160+
uses: actions/checkout@v3.4.0
165161
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
166162
id: python
167-
uses: actions/setup-python@v4.2.0
163+
uses: actions/setup-python@v4.5.0
168164
with:
169165
python-version: ${{ env.DEFAULT_PYTHON }}
166+
check-latest: true
170167
- name: Restore Python virtual environment
171168
id: cache-venv
172-
uses: actions/cache@v3.0.8
169+
uses: actions/cache@v3.3.1
173170
with:
174171
path: venv
172+
fail-on-cache-miss: true
175173
key:
176174
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
177175
needs.prepare-base.outputs.python-key }}
178-
- name: Fail job if Python cache restore failed
179-
if: steps.cache-venv.outputs.cache-hit != 'true'
180-
run: |
181-
echo "Failed to restore Python venv from cache"
182-
exit 1
183176
- name: Install tox
184177
run: |
185178
pip install -U tox

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ on:
2020
schedule:
2121
- cron: "44 16 * * 4"
2222

23+
permissions:
24+
contents: read
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+
cancel-in-progress: true
29+
2330
jobs:
2431
analyze:
2532
name: Analyze
@@ -39,7 +46,7 @@ jobs:
3946

4047
steps:
4148
- name: Checkout repository
42-
uses: actions/checkout@v3.0.2
49+
uses: actions/checkout@v3.4.0
4350

4451
# Initializes the CodeQL tools for scanning.
4552
- name: Initialize CodeQL

0 commit comments

Comments
 (0)