Skip to content

Commit

Permalink
Add regression test for #8554 (#8682)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Sassoulas <[email protected]>
  • Loading branch information
jacobtylerwalls and Pierre-Sassoulas authored Jun 7, 2023
1 parent a67ffbd commit 2acca90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 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
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 2acca90

Please sign in to comment.