diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-06-16 13:28:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 13:28:08 +0200 |
commit | 5c23856c67a598a26678adfe943cc6224acec0f7 (patch) | |
tree | 07654c8552ad67033e3e1d17e2d79f34f73edf2f | |
parent | 23c82384309befc5ac6c07d087cd0e209006c839 (diff) | |
download | pylint-git-5c23856c67a598a26678adfe943cc6224acec0f7.tar.gz |
Remove deprecated astroid.Ellipsis node (#4567)
-rw-r--r-- | pylint/checkers/base.py | 4 | ||||
-rw-r--r-- | pylint/checkers/format.py | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index 03ca991a5..1dbe12035 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -1205,9 +1205,7 @@ class BasicChecker(_BasicChecker): # warn W0106 if we have any underlying function call (we can't predict # side effects), else pointless-statement if ( - isinstance( - expr, (astroid.Yield, astroid.Await, astroid.Ellipsis, astroid.Call) - ) + isinstance(expr, (astroid.Yield, astroid.Await, astroid.Call)) or ( isinstance(node.parent, astroid.TryExcept) and node.parent.body == [node] diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py index 07e61f831..89877521a 100644 --- a/pylint/checkers/format.py +++ b/pylint/checkers/format.py @@ -632,9 +632,10 @@ class FormatChecker(BaseTokenChecker): return # Function overloads that use ``Ellipsis`` are exempted. - if isinstance(node, nodes.Expr) and ( - isinstance(node.value, nodes.Ellipsis) - or (isinstance(node.value, nodes.Const) and node.value.value is Ellipsis) + if ( + isinstance(node, nodes.Expr) + and isinstance(node.value, nodes.Const) + and node.value.value is Ellipsis ): frame = node.frame() if is_overload_stub(frame) or is_protocol_class(node_frame_class(frame)): |