Skip to content

Commit b59dfea

Browse files
Add regression test for #8554 (#8682) (#8751)
Co-authored-by: Pierre Sassoulas <[email protected]> (cherry picked from commit 2acca90) Co-authored-by: Jacob Walls <[email protected]>
1 parent f37d4cb commit b59dfea

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

doc/whatsnew/fragments/8554.bugfix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed crash when a call to ``super()`` was placed after an operator (e.g. ``not``).
2+
3+
Closes #8554

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
# Also upgrade requirements_test_min.txt.
4040
# Pinned to dev of second minor update to allow editable installs and fix primer issues,
4141
# see https://github.com/pylint-dev/astroid/issues/1341
42-
"astroid>=2.15.4,<=2.17.0-dev0",
42+
"astroid>=2.15.5,<=2.17.0-dev0",
4343
"isort>=4.2.5,<6",
4444
"mccabe>=0.6,<0.8",
4545
"tomli>=1.1.0;python_version<'3.11'",

requirements_test_min.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-e .[testutils,spelling]
22
# astroid dependency is also defined in pyproject.toml
3-
astroid==2.15.4 # Pinned to a specific version for tests
3+
astroid==2.15.5 # Pinned to a specific version for tests
44
typing-extensions~=4.5
55
py~=1.11.0
66
pytest~=7.2

tests/functional/i/invalid/invalid_unary_operand_type.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@ class A:
4949
invert_instance = ~A() # [invalid-unary-operand-type]
5050
invert_module = ~collections # [invalid-unary-operand-type]
5151
invert_float = ~2.0 # [invalid-unary-operand-type]
52+
53+
54+
class NoArgumentSuper:
55+
def __init__(self):
56+
"""https://github.com/pylint-dev/pylint/issues/8554"""
57+
if not isinstance(super(), float):
58+
pass

0 commit comments

Comments
 (0)