Skip to content

Commit 1b758c6

Browse files
Merge branch 'main' into uninferable
2 parents 72ef6c1 + e84f613 commit 1b758c6

Some content is hidden

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

67 files changed

+1926
-499
lines changed

.github/workflows/ci.yaml

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
pull_request: ~
99

1010
env:
11-
CACHE_VERSION: 6
11+
CACHE_VERSION: 2
12+
KEY_PREFIX: venv
1213
DEFAULT_PYTHON: "3.10"
1314
PRE_COMMIT_CACHE: ~/.cache/pre-commit
1415

@@ -19,50 +20,47 @@ jobs:
1920
timeout-minutes: 20
2021
steps:
2122
- name: Check out code from GitHub
22-
uses: actions/checkout@v3.0.2
23+
uses: actions/checkout@v3.1.0
2324
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2425
id: python
25-
uses: actions/setup-python@v4.2.0
26+
uses: actions/setup-python@v4.3.0
2627
with:
2728
python-version: ${{ env.DEFAULT_PYTHON }}
29+
check-latest: true
2830
- name: Generate partial Python venv restore key
2931
id: generate-python-key
3032
run: >-
31-
echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
32-
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt',
33-
'requirements_test_brain.txt', 'requirements_test_pre_commit.txt') }}"
33+
echo "key=base-venv-${{ env.CACHE_VERSION }}-${{
34+
hashFiles('pyproject.toml', 'requirements_test.txt',
35+
'requirements_test_min.txt', 'requirements_test_brain.txt',
36+
'requirements_test_pre_commit.txt') }}" >> $GITHUB_OUTPUT
3437
- name: Restore Python virtual environment
3538
id: cache-venv
36-
uses: actions/[email protected].6
39+
uses: actions/[email protected].11
3740
with:
3841
path: venv
3942
key: >-
4043
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
4144
steps.generate-python-key.outputs.key }}
42-
restore-keys: |
43-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
4445
- name: Create Python virtual environment
4546
if: steps.cache-venv.outputs.cache-hit != 'true'
4647
run: |
4748
python -m venv venv
4849
. venv/bin/activate
4950
python -m pip install -U pip setuptools wheel
5051
pip install -U -r requirements_test.txt -r requirements_test_brain.txt
51-
pip install -e .
5252
- name: Generate pre-commit restore key
5353
id: generate-pre-commit-key
5454
run: >-
55-
echo "::set-output name=key::pre-commit-${{ env.CACHE_VERSION }}-${{
56-
hashFiles('.pre-commit-config.yaml') }}"
55+
echo "key=pre-commit-${{ env.CACHE_VERSION }}-${{
56+
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
5757
- name: Restore pre-commit environment
5858
id: cache-precommit
59-
uses: actions/[email protected].6
59+
uses: actions/[email protected].11
6060
with:
6161
path: ${{ env.PRE_COMMIT_CACHE }}
6262
key: >-
6363
${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
64-
restore-keys: |
65-
${{ runner.os }}-pre-commit-${{ env.CACHE_VERSION }}-
6664
- name: Install pre-commit dependencies
6765
if: steps.cache-precommit.outputs.cache-hit != 'true'
6866
run: |
@@ -71,7 +69,6 @@ jobs:
7169
- name: Run pre-commit checks
7270
run: |
7371
. venv/bin/activate
74-
pip install -e .
7572
pre-commit run pylint --all-files
7673
7774
tests-linux:
@@ -81,37 +78,37 @@ jobs:
8178
strategy:
8279
fail-fast: false
8380
matrix:
84-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11-dev"]
81+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
8582
outputs:
8683
python-key: ${{ steps.generate-python-key.outputs.key }}
8784
steps:
8885
- name: Check out code from GitHub
89-
uses: actions/checkout@v3.0.2
86+
uses: actions/checkout@v3.1.0
9087
- name: Set up Python ${{ matrix.python-version }}
9188
id: python
92-
uses: actions/setup-python@v4.2.0
89+
uses: actions/setup-python@v4.3.0
9390
with:
9491
python-version: ${{ matrix.python-version }}
92+
check-latest: true
9593
- name: Install Qt
9694
if: ${{ matrix.python-version == '3.10' }}
9795
run: |
9896
sudo apt-get install build-essential libgl1-mesa-dev
9997
- name: Generate partial Python venv restore key
10098
id: generate-python-key
10199
run: >-
102-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
103-
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt',
104-
'requirements_test_brain.txt') }}"
100+
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
101+
hashFiles('pyproject.toml', 'requirements_test.txt',
102+
'requirements_test_min.txt', 'requirements_test_brain.txt') }}" >>
103+
$GITHUB_OUTPUT
105104
- name: Restore Python virtual environment
106105
id: cache-venv
107-
uses: actions/[email protected].6
106+
uses: actions/[email protected].11
108107
with:
109108
path: venv
110109
key: >-
111110
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
112111
steps.generate-python-key.outputs.key }}
113-
restore-keys: |
114-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
115112
- name: Create Python virtual environment
116113
if: steps.cache-venv.outputs.cache-hit != 'true'
117114
run: |
@@ -125,7 +122,7 @@ jobs:
125122
. venv/bin/activate
126123
pytest --cov --cov-report= tests/
127124
- name: Upload coverage artifact
128-
uses: actions/[email protected].0
125+
uses: actions/[email protected].1
129126
with:
130127
name: coverage-${{ matrix.python-version }}
131128
path: .coverage
@@ -142,15 +139,16 @@ jobs:
142139
COVERAGERC_FILE: .coveragerc
143140
steps:
144141
- name: Check out code from GitHub
145-
uses: actions/checkout@v3.0.2
142+
uses: actions/checkout@v3.1.0
146143
- name: Set up Python ${{ matrix.python-version }}
147144
id: python
148-
uses: actions/setup-python@v4.2.0
145+
uses: actions/setup-python@v4.3.0
149146
with:
150147
python-version: ${{ matrix.python-version }}
148+
check-latest: true
151149
- name: Restore Python virtual environment
152150
id: cache-venv
153-
uses: actions/[email protected].6
151+
uses: actions/[email protected].11
154152
with:
155153
path: venv
156154
key:
@@ -162,7 +160,7 @@ jobs:
162160
echo "Failed to restore Python venv from cache"
163161
exit 1
164162
- name: Download all coverage artifacts
165-
uses: actions/[email protected].0
163+
uses: actions/[email protected].1
166164
- name: Combine coverage results
167165
run: |
168166
. venv/bin/activate
@@ -183,35 +181,34 @@ jobs:
183181
strategy:
184182
fail-fast: false
185183
matrix:
186-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11-dev"]
184+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
187185
steps:
188186
- name: Set temp directory
189187
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
190188
# Workaround to set correct temp directory on Windows
191189
# https://github.com/actions/virtual-environments/issues/712
192190
- name: Check out code from GitHub
193-
uses: actions/checkout@v3.0.2
191+
uses: actions/checkout@v3.1.0
194192
- name: Set up Python ${{ matrix.python-version }}
195193
id: python
196-
uses: actions/setup-python@v4.2.0
194+
uses: actions/setup-python@v4.3.0
197195
with:
198196
python-version: ${{ matrix.python-version }}
197+
check-latest: true
199198
- name: Generate partial Python venv restore key
200199
id: generate-python-key
201200
run: >-
202-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
203-
hashFiles('setup.cfg', 'requirements_test_min.txt',
204-
'requirements_test_brain.txt') }}"
201+
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
202+
hashFiles('pyproject.toml', 'requirements_test_min.txt',
203+
'requirements_test_brain.txt') }}" >> $env:GITHUB_OUTPUT
205204
- name: Restore Python virtual environment
206205
id: cache-venv
207-
uses: actions/[email protected].6
206+
uses: actions/[email protected].11
208207
with:
209208
path: venv
210209
key: >-
211210
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
212211
steps.generate-python-key.outputs.key }}
213-
restore-keys: |
214-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
215212
- name: Create Python virtual environment
216213
if: steps.cache-venv.outputs.cache-hit != 'true'
217214
run: |
@@ -235,27 +232,27 @@ jobs:
235232
python-version: ["pypy3.7", "pypy3.8", "pypy3.9"]
236233
steps:
237234
- name: Check out code from GitHub
238-
uses: actions/checkout@v3.0.2
235+
uses: actions/checkout@v3.1.0
239236
- name: Set up Python ${{ matrix.python-version }}
240237
id: python
241-
uses: actions/setup-python@v4.2.0
238+
uses: actions/setup-python@v4.3.0
242239
with:
243240
python-version: ${{ matrix.python-version }}
241+
check-latest: true
244242
- name: Generate partial Python venv restore key
245243
id: generate-python-key
246244
run: >-
247-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
248-
hashFiles('setup.cfg', 'requirements_test_min.txt') }}"
245+
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
246+
hashFiles('pyproject.toml', 'requirements_test_min.txt')
247+
}}" >> $GITHUB_OUTPUT
249248
- name: Restore Python virtual environment
250249
id: cache-venv
251-
uses: actions/[email protected].6
250+
uses: actions/[email protected].11
252251
with:
253252
path: venv
254253
key: >-
255254
${{ runner.os }}-${{ matrix.python-version }}-${{
256255
steps.generate-python-key.outputs.key }}
257-
restore-keys: |
258-
${{ runner.os }}-${{ matrix.python-version }}-venv-${{ env.CACHE_VERSION }}-
259256
- name: Create Python virtual environment
260257
if: steps.cache-venv.outputs.cache-hit != 'true'
261258
run: |

.github/workflows/codeql-analysis.yml

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

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v3.0.2
42+
uses: actions/checkout@v3.1.0
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL

.github/workflows/release-tests.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Release tests
22

33
on: workflow_dispatch
44

5-
env:
6-
DEFAULT_PYTHON: "3.10"
7-
85
permissions:
96
contents: read
107

@@ -16,12 +13,13 @@ jobs:
1613
timeout-minutes: 5
1714
steps:
1815
- name: Check out code from GitHub
19-
uses: actions/checkout@v3.0.2
20-
- name: Set up Python
16+
uses: actions/checkout@v3.1.0
17+
- name: Set up Python 3.9
2118
id: python
22-
uses: actions/setup-python@v4.2.0
19+
uses: actions/setup-python@v4.3.0
2320
with:
24-
python-version: ${{ env.DEFAULT_PYTHON }}
21+
# virtualenv 15.1.0 cannot be installed on Python 3.10+
22+
python-version: 3.9
2523
- name: Create Python virtual environment with virtualenv==15.1.0
2624
run: |
2725
python -m pip install virtualenv==15.1.0

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ jobs:
1515
release-pypi:
1616
name: Upload release to PyPI
1717
runs-on: ubuntu-latest
18+
environment:
19+
name: PyPI
20+
url: https://pypi.org/project/astroid/
1821
steps:
1922
- name: Check out code from Github
20-
uses: actions/checkout@v3.0.2
23+
uses: actions/checkout@v3.1.0
2124
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2225
id: python
23-
uses: actions/setup-python@v4.2.0
26+
uses: actions/setup-python@v4.3.0
2427
with:
2528
python-version: ${{ env.DEFAULT_PYTHON }}
29+
check-latest: true
2630
- name: Install requirements
2731
run: |
2832
# Remove dist, build, and astroid.egg-info

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ repos:
99
exclude: .github/|tests/testdata
1010
- id: end-of-file-fixer
1111
exclude: tests/testdata
12-
- repo: https://github.com/myint/autoflake
13-
rev: v1.4
12+
- repo: https://github.com/PyCQA/autoflake
13+
rev: v1.7.7
1414
hooks:
1515
- id: autoflake
1616
exclude: tests/testdata|astroid/__init__.py|astroid/scoped_nodes.py|astroid/node_classes.py
@@ -28,7 +28,7 @@ repos:
2828
exclude: tests/testdata|setup.py
2929
types: [python]
3030
- repo: https://github.com/asottile/pyupgrade
31-
rev: v2.37.3
31+
rev: v3.2.2
3232
hooks:
3333
- id: pyupgrade
3434
exclude: tests/testdata
@@ -44,7 +44,7 @@ repos:
4444
- id: black-disable-checker
4545
exclude: tests/unittest_nodes_lineno.py
4646
- repo: https://github.com/psf/black
47-
rev: 22.6.0
47+
rev: 22.10.0
4848
hooks:
4949
- id: black
5050
args: [--safe, --quiet]
@@ -54,7 +54,7 @@ repos:
5454
hooks:
5555
- id: flake8
5656
additional_dependencies:
57-
[flake8-bugbear==22.3.23, flake8-typing-imports==1.12.0]
57+
[flake8-bugbear==22.10.27, flake8-typing-imports==1.14.0]
5858
exclude: tests/testdata|doc/conf.py
5959
- repo: local
6060
hooks:
@@ -71,7 +71,7 @@ repos:
7171
]
7272
exclude: tests/testdata|conf.py
7373
- repo: https://github.com/pre-commit/mirrors-mypy
74-
rev: v0.971
74+
rev: v0.991
7575
hooks:
7676
- id: mypy
7777
name: mypy
@@ -90,7 +90,7 @@ repos:
9090
]
9191
exclude: tests/testdata| # exclude everything, we're not ready
9292
- repo: https://github.com/pre-commit/mirrors-prettier
93-
rev: v2.7.1
93+
rev: v3.0.0-alpha.4
9494
hooks:
9595
- id: prettier
9696
args: [--prose-wrap=always, --print-width=88]

CONTRIBUTORS.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Maintainers
2323
- Łukasz Rogalski <[email protected]>
2424
- Florian Bruhin <[email protected]>
2525
- Ashley Whetter <[email protected]>
26+
- Mark Byrne <[email protected]>
2627
- Dimitri Prybysh <[email protected]>
2728
- Areveny <[email protected]>
2829

@@ -56,7 +57,6 @@ Contributors
5657
- Philip Lorenz <[email protected]>
5758
- Nicolas Chauvat <[email protected]>
5859
- Michael K <[email protected]>
59-
- Mark Byrne <[email protected]>
6060
- Mario Corchero <[email protected]>
6161
- Marien Zwart <[email protected]>
6262
- Laura Médioni <[email protected]>
@@ -105,11 +105,13 @@ Contributors
105105
- Valentin Valls <[email protected]>
106106
- Uilian Ries <[email protected]>
107107
- Tomas Novak <[email protected]>
108+
- Tim Paine <[email protected]>
108109
- Thirumal Venkat <[email protected]>
109110
- SupImDos <[email protected]>
110111
- Stanislav Levin <[email protected]>
111112
- Simon Hewitt <[email protected]>
112113
- Serhiy Storchaka <[email protected]>
114+
- Saugat Pachhai (सौगात) <[email protected]>
113115
- Roy Wright <[email protected]>
114116
- Robin Jarry <[email protected]>
115117
- René Fritze <[email protected]>

0 commit comments

Comments
 (0)