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/checkout@v3.0.0
42+
uses: actions/checkout@v3.0.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/checkout@v3.0.0
16+
uses: actions/checkout@v3.0.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/checkout@v3.0.2
42+
- name: Set up Python
43+
id: python
44+
uses: actions/setup-python@v3.1.0
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/checkout@v3.0.0
17+
uses: actions/checkout@v3.0.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 <pcmanticore@gmail.com>
810
- Sylvain Thénault <thenault@gmail.com>
11+
- Torsten Marek <shlomme@gmail.com>
12+
13+
14+
Maintainers
15+
-----------
916
- Pierre Sassoulas <pierre.sassoulas@gmail.com>
1017
- Hippo91 <guillaume.peillex@gmail.com>
1118
- Marc Mueller <30130371+cdce8p@users.noreply.github.com>
@@ -23,7 +30,6 @@ Maintainers
2330
Contributors
2431
------------
2532
- LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
26-
- Google, Inc.
2733
- Nick Drozd <nicholasdrozd@gmail.com>
2834
- Andrew Haigh <hello@nelf.in>
2935
- David Liu <david@cs.toronto.edu>
@@ -32,14 +38,14 @@ Contributors
3238
- Julien Jehannet <julien.jehannet@logilab.fr>
3339
- Calen Pennington <calen.pennington@gmail.com>
3440
- Phil Schaf <flying-sheep@web.de>
41+
- Hugo van Kemenade <hugovk@users.noreply.github.com>
3542
- Alex Hall <alex.mojaki@gmail.com>
36-
- jarradhope
3743
- Tushar Sadhwani <86737547+tushar-deepsource@users.noreply.github.com>
3844
- Tim Martin <tim@asymptotic.co.uk>
3945
- Raphael Gaschignard <raphael@makeleaps.com>
4046
- Radosław Ganczarek <radoslaw@ganczarek.in>
47+
- Paligot Gérard <androwiiid@gmail.com>
4148
- Ioana Tagirta <ioana.tagirta@gmail.com>
42-
- Hugo <hugovk@users.noreply.github.com>
4349
- Derek Gustafson <degustaf@gmail.com>
4450
- David Shea <dshea@redhat.com>
4551
- Daniel Harding <dharding@gmail.com>
@@ -50,7 +56,6 @@ Contributors
5056
- Marien Zwart <marienz@gentoo.org>
5157
- FELD Boris <lothiraldan@gmail.com>
5258
- Enji Cooper <yaneurabeya@gmail.com>
53-
- AndroWiiid <androwiiid@gmail.com>
5459
- doranid <ddandd@gmail.com>
5560
- brendanator <brendan.maginnis@gmail.com>
5661
- Tomas Gavenciak <gavento@ucw.cz>
@@ -69,7 +74,7 @@ Contributors
6974
- Joshua Cannon <joshdcannon@gmail.com>
7075
- John Vandenberg <jayvdb@gmail.com>
7176
- Jacob Bogdanov <jacob@bogdanov.dev>
72-
- François Mockers
77+
- Google, Inc. <no-reply@google.com>
7378
- David Euresti <github@euresti.com>
7479
- David Cain <davidjosephcain@gmail.com>
7580
- Anthony Sottile <asottile@umich.edu>
@@ -78,14 +83,10 @@ Contributors
7883
- tristanlatr <19967168+tristanlatr@users.noreply.github.com>
7984
- rr- <rr-@sakuya.pl>
8085
- raylu <lurayl@gmail.com>
81-
- platings
8286
- mathieui <mathieui@users.noreply.github.com>
8387
- markmcclain <markmcclain@users.noreply.github.com>
84-
- kasium <15907922+kasium@users.noreply.github.com>
8588
- ioanatia <ioanatia@users.noreply.github.com>
8689
- grayjk <grayjk@gmail.com>
87-
- carl
88-
- alain lefroy
8990
- Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
9091
- Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
9192
- Vilnis Termanis <vilnis.termanis@iotics.com>
@@ -104,18 +105,17 @@ Contributors
104105
- Philipp Hörist <philipp@hoerist.com>
105106
- Peter de Blanc <peter@standard.ai>
106107
- Peter Talley <peterctalley@gmail.com>
107-
- Paligot Gérard <androwiiid@gmail.com>
108108
- Ovidiu Sabou <ovidiu@sabou.org>
109109
- Nicolas Noirbent <nicolas@noirbent.fr>
110110
- Neil Girdhar <mistersheik@gmail.com>
111111
- Michał Masłowski <m.maslowski@clearcode.cc>
112112
- Michael K <michael-k@users.noreply.github.com>
113113
- Mateusz Bysiek <mb@mbdev.pl>
114-
- Mark Gius
115114
- Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
116115
- Leandro T. C. Melo <ltcmelo@gmail.com>
117116
- Konrad Weihmann <kweihmann@outlook.com>
118117
- Kian Meng, Ang <kianmeng.ang@gmail.com>
118+
- Kai Mueller <15907922+kasium@users.noreply.github.com>
119119
- Jörg Thalheim <Mic92@users.noreply.github.com>
120120
- Jonathan Striebel <jstriebel@users.noreply.github.com>
121121
- John Belmonte <john@neggie.net>
@@ -126,7 +126,6 @@ Contributors
126126
- Jakub Wilk <jwilk@jwilk.net>
127127
- Iva Miholic <ivamiho@gmail.com>
128128
- Ionel Maries Cristian <contact@ionelmc.ro>
129-
- Hugo van Kemenade <hugovk@users.noreply.github.com>
130129
- HoverHell <hoverhell@gmail.com>
131130
- HQupgradeHQ <18361586+HQupgradeHQ@users.noreply.github.com>
132131
- Grygorii Iermolenko <gyermolenko@gmail.com>
@@ -163,3 +162,15 @@ Contributors
163162
- Alphadelta14 <alpha@alphaservcomputing.solutions>
164163
- Alexander Presnyakov <flagist0@gmail.com>
165164
- Ahmed Azzaoui <ahmed.azzaoui@engie.com>
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)