Skip to content

Commit

Permalink
Add regression test for #8554 (#8682) (#8751)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Sassoulas <[email protected]>
(cherry picked from commit 2acca90)

Co-authored-by: Jacob Walls <[email protected]>
  • Loading branch information
github-actions[bot] and jacobtylerwalls authored Jun 7, 2023
1 parent f37d4cb commit b59dfea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/whatsnew/fragments/8554.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fixed crash when a call to ``super()`` was placed after an operator (e.g. ``not``).

Closes #8554
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies = [
# Also upgrade requirements_test_min.txt.
# Pinned to dev of second minor update to allow editable installs and fix primer issues,
# see https://github.com/pylint-dev/astroid/issues/1341
"astroid>=2.15.4,<=2.17.0-dev0",
"astroid>=2.15.5,<=2.17.0-dev0",
"isort>=4.2.5,<6",
"mccabe>=0.6,<0.8",
"tomli>=1.1.0;python_version<'3.11'",
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_min.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-e .[testutils,spelling]
# astroid dependency is also defined in pyproject.toml
astroid==2.15.4 # Pinned to a specific version for tests
astroid==2.15.5 # Pinned to a specific version for tests
typing-extensions~=4.5
py~=1.11.0
pytest~=7.2
Expand Down
7 changes: 7 additions & 0 deletions tests/functional/i/invalid/invalid_unary_operand_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ class A:
invert_instance = ~A() # [invalid-unary-operand-type]
invert_module = ~collections # [invalid-unary-operand-type]
invert_float = ~2.0 # [invalid-unary-operand-type]


class NoArgumentSuper:
def __init__(self):
"""https://github.com/pylint-dev/pylint/issues/8554"""
if not isinstance(super(), float):
pass

0 comments on commit b59dfea

Please sign in to comment.