Skip to content

Commit e49f220

Browse files
committed
Merge branch 'main' of https://github.com/PyCQA/astroid into orelse-lineno
2 parents 280191c + 615587b commit e49f220

38 files changed

+628
-512
lines changed

.github/workflows/ci.yaml

Lines changed: 74 additions & 167 deletions
Large diffs are not rendered by default.

.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/[email protected].0
42+
uses: actions/[email protected].2
4343

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

.github/workflows/release-tests.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
timeout-minutes: 5
1414
steps:
1515
- name: Check out code from GitHub
16-
uses: actions/[email protected].0
16+
uses: actions/[email protected].2
1717
- name: Set up Python
1818
id: python
19-
uses: actions/setup-python@v3.0.0
19+
uses: actions/setup-python@v3.1.2
2020
with:
2121
python-version: ${{ env.DEFAULT_PYTHON }}
2222
- name: Create Python virtual environment with virtualenv==15.1.0
@@ -31,3 +31,31 @@ jobs:
3131
. venv2\scripts\activate
3232
echo "import distutils.util # pylint: disable=unused-import" > test.py
3333
pylint test.py
34+
35+
additional-dependencies-linux-tests:
36+
name: Regression tests w/ additional dependencies (Linux)
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 5
39+
steps:
40+
- name: Check out code from GitHub
41+
uses: actions/[email protected]
42+
- name: Set up Python
43+
id: python
44+
uses: actions/[email protected]
45+
with:
46+
python-version: ${{ env.DEFAULT_PYTHON }}
47+
- name: Install Qt
48+
run: |
49+
sudo apt-get install build-essential libgl1-mesa-dev
50+
- name: Create Python virtual environment
51+
run: |
52+
python -m venv venv
53+
. venv/bin/activate
54+
python -m pip install -U pip setuptools wheel
55+
pip install -U -r requirements_test.txt -r requirements_test_brain.txt
56+
pip install -e .
57+
- name: Run brain_qt tests
58+
# Regression test added in https://github.com/PyCQA/astroid/pull/1505
59+
run: |
60+
. venv/bin/activate
61+
pytest tests/unittest_brain_qt.py

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Check out code from Github
17-
uses: actions/[email protected].0
17+
uses: actions/[email protected].2
1818
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
1919
id: python
20-
uses: actions/setup-python@v3.0.0
20+
uses: actions/setup-python@v3.1.2
2121
with:
2222
python-version: ${{ env.DEFAULT_PYTHON }}
2323
- name: Install requirements

.pre-commit-config.yaml

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

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.1.0
6+
rev: v4.2.0
77
hooks:
88
- id: trailing-whitespace
99
exclude: .github/|tests/testdata
@@ -21,14 +21,14 @@ repos:
2121
- --remove-duplicate-keys
2222
- --remove-unused-variables
2323
- repo: https://github.com/Pierre-Sassoulas/copyright_notice_precommit
24-
rev: 6f5a59c3e1cb0f20731eb1ff32622c9a2fc72d9a
24+
rev: 0.1.2
2525
hooks:
2626
- id: copyright-notice
2727
args: ["--notice=script/copyright.txt", "--enforce-all", "--autofix"]
2828
exclude: tests/testdata|setup.py
2929
types: [python]
3030
- repo: https://github.com/asottile/pyupgrade
31-
rev: v2.31.0
31+
rev: v2.32.0
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.1.0
47+
rev: 22.3.0
4848
hooks:
4949
- id: black
5050
args: [--safe, --quiet]
@@ -53,7 +53,8 @@ repos:
5353
rev: 4.0.1
5454
hooks:
5555
- id: flake8
56-
additional_dependencies: [flake8-bugbear, flake8-typing-imports==1.12.0]
56+
additional_dependencies:
57+
[flake8-bugbear==22.3.23, flake8-typing-imports==1.12.0]
5758
exclude: tests/testdata|doc/conf.py
5859
- repo: local
5960
hooks:
@@ -70,7 +71,7 @@ repos:
7071
]
7172
exclude: tests/testdata|conf.py
7273
- repo: https://github.com/pre-commit/mirrors-mypy
73-
rev: v0.940
74+
rev: v0.942
7475
hooks:
7576
- id: mypy
7677
name: mypy
@@ -89,7 +90,7 @@ repos:
8990
]
9091
exclude: tests/testdata| # exclude everything, we're not ready
9192
- repo: https://github.com/pre-commit/mirrors-prettier
92-
rev: v2.5.1
93+
rev: v2.6.2
9394
hooks:
9495
- id: prettier
9596
args: [--prose-wrap=always, --print-width=88]

CONTRIBUTORS.txt

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
# This file is autogenerated by 'contributors-txt',
2-
# using the configuration in 'script/.contributors_aliases.json'
3-
# please do not modify manually
1+
# This file is autocompleted by 'contributors-txt',
2+
# using the configuration in 'script/.contributors_aliases.json'.
3+
# Do not add new persons manually and only add information without
4+
# using '-' as the line first character.
5+
# Please verify that your change are stable if you modify manually.
46

5-
Maintainers
6-
-----------
7+
Ex-maintainers
8+
--------------
79
- Claudiu Popa <[email protected]>
810
- Sylvain Thénault <[email protected]>
11+
- Torsten Marek <[email protected]>
12+
13+
14+
Maintainers
15+
-----------
916
- Pierre Sassoulas <[email protected]>
1017
- Hippo91 <[email protected]>
1118
- Marc Mueller <[email protected]>
@@ -23,7 +30,6 @@ Maintainers
2330
Contributors
2431
------------
2532
- LOGILAB S.A. (Paris, FRANCE) <[email protected]>
26-
- Google, Inc.
2733
- Nick Drozd <[email protected]>
2834
- Andrew Haigh <[email protected]>
2935
- David Liu <[email protected]>
@@ -32,14 +38,14 @@ Contributors
3238
- Julien Jehannet <[email protected]>
3339
- Calen Pennington <[email protected]>
3440
- Phil Schaf <[email protected]>
41+
- Hugo van Kemenade <[email protected]>
3542
- Alex Hall <[email protected]>
36-
- jarradhope
3743
- Tushar Sadhwani <[email protected]>
3844
- Tim Martin <[email protected]>
3945
- Raphael Gaschignard <[email protected]>
4046
- Radosław Ganczarek <[email protected]>
47+
- Paligot Gérard <[email protected]>
4148
- Ioana Tagirta <[email protected]>
42-
4349
- Derek Gustafson <[email protected]>
4450
- David Shea <[email protected]>
4551
- Daniel Harding <[email protected]>
@@ -50,7 +56,6 @@ Contributors
5056
- Marien Zwart <[email protected]>
5157
- FELD Boris <[email protected]>
5258
- Enji Cooper <[email protected]>
53-
- AndroWiiid <[email protected]>
5459
- doranid <[email protected]>
5560
- brendanator <[email protected]>
5661
- Tomas Gavenciak <[email protected]>
@@ -69,7 +74,7 @@ Contributors
6974
- Joshua Cannon <[email protected]>
7075
- John Vandenberg <[email protected]>
7176
- Jacob Bogdanov <[email protected]>
72-
- François Mockers
77+
- Google, Inc. <[email protected]>
7378
- David Euresti <[email protected]>
7479
- David Cain <[email protected]>
7580
- Anthony Sottile <[email protected]>
@@ -78,14 +83,10 @@ Contributors
7883
- tristanlatr <[email protected]>
7984
8085
81-
- platings
8286
- mathieui <[email protected]>
8387
- markmcclain <[email protected]>
84-
8588
- ioanatia <[email protected]>
8689
87-
- carl
88-
- alain lefroy
8990
- Zbigniew Jędrzejewski-Szmek <[email protected]>
9091
- Zac Hatfield-Dodds <[email protected]>
9192
- Vilnis Termanis <[email protected]>
@@ -104,18 +105,17 @@ Contributors
104105
- Philipp Hörist <[email protected]>
105106
- Peter de Blanc <[email protected]>
106107
- Peter Talley <[email protected]>
107-
- Paligot Gérard <[email protected]>
108108
- Ovidiu Sabou <[email protected]>
109109
- Nicolas Noirbent <[email protected]>
110110
- Neil Girdhar <[email protected]>
111111
- Michał Masłowski <[email protected]>
112112
- Michael K <[email protected]>
113113
- Mateusz Bysiek <[email protected]>
114-
- Mark Gius
115114
- Mark Byrne <[email protected]>
116115
- Leandro T. C. Melo <[email protected]>
117116
- Konrad Weihmann <[email protected]>
118117
- Kian Meng, Ang <[email protected]>
118+
- Kai Mueller <[email protected]>
119119
- Jörg Thalheim <[email protected]>
120120
- Jonathan Striebel <[email protected]>
121121
- John Belmonte <[email protected]>
@@ -126,7 +126,6 @@ Contributors
126126
- Jakub Wilk <[email protected]>
127127
- Iva Miholic <[email protected]>
128128
- Ionel Maries Cristian <[email protected]>
129-
- Hugo van Kemenade <[email protected]>
130129
- HoverHell <[email protected]>
131130
- HQupgradeHQ <[email protected]>
132131
- Grygorii Iermolenko <[email protected]>
@@ -163,3 +162,15 @@ Contributors
163162
- Alphadelta14 <[email protected]>
164163
- Alexander Presnyakov <[email protected]>
165164
- Ahmed Azzaoui <[email protected]>
165+
166+
Co-Author
167+
---------
168+
The following persons were credited manually but did not commit themselves
169+
under this name, or we did not manage to find their commits in the history.
170+
171+
- François Mockers
172+
- platings
173+
- carl
174+
- alain lefroy
175+
- Mark Gius
176+
- jarradhope

ChangeLog

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,50 @@ Release date: TBA
88

99
* Add ``orelse_lineno`` and ``orelse_col_offset`` attributes to ``nodes.If``.
1010

11-
What's New in astroid 2.11.1?
11+
* Fix ``re`` brain on Python ``3.11``. The flags now come from ``re._compile``.
12+
13+
* Build ``nodes.Module`` for frozen modules which have location information in their
14+
``ModuleSpec``.
15+
16+
Closes #1512
17+
18+
* Rename ``ModuleSpec`` -> ``module_type`` constructor parameter to match attribute
19+
name and improve typing. Use ``type`` instead.
20+
21+
22+
What's New in astroid 2.11.4?
1223
=============================
1324
Release date: TBA
1425

26+
* Fix ``col_offset`` attribute for nodes involving ``with`` on ``PyPy``.
27+
28+
29+
What's New in astroid 2.11.3?
30+
=============================
31+
Release date: 2022-04-19
32+
33+
* Fixed an error in the Qt brain when building ``instance_attrs``.
34+
35+
Closes PyCQA/pylint#6221
36+
37+
* Fixed a crash in the ``gi`` brain.
38+
39+
Closes PyCQA/pylint#6371
40+
41+
42+
What's New in astroid 2.11.2?
43+
=============================
44+
Release date: 2022-03-26
45+
46+
* Avoided adding the name of a parent namedtuple to its child's locals.
47+
48+
Refs PyCQA/pylint#5982
49+
50+
51+
What's New in astroid 2.11.1?
52+
=============================
53+
Release date: 2022-03-22
54+
1555
* Promoted ``getattr()`` from ``astroid.scoped_nodes.FunctionDef`` to its parent
1656
``astroid.scoped_nodes.Lambda``.
1757

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Astroid
1717
:alt: pre-commit.ci status
1818

1919
.. |tidelift_logo| image:: https://raw.githubusercontent.com/PyCQA/astroid/main/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png
20-
:width: 75
21-
:height: 60
20+
:width: 200
2221
:alt: Tidelift
2322

2423
.. list-table::

0 commit comments

Comments
 (0)