diff options
| author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-11-17 12:56:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-17 12:56:08 +0100 |
| commit | 5845f21095aeb178f92cad607817e7a407a4b539 (patch) | |
| tree | 10d804c6828f414cb960ab44b51cd3e0991069c5 /astroid | |
| parent | 2c9c187b1c47adc4661246b922e3a41dc0756396 (diff) | |
| download | astroid-git-5845f21095aeb178f92cad607817e7a407a4b539.tar.gz | |
Add additional flags to ``mypy`` config and update ``type: ignore``'s (#1248)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Diffstat (limited to 'astroid')
| -rw-r--r-- | astroid/nodes/node_ng.py | 2 | ||||
| -rw-r--r-- | astroid/rebuilder.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index 81fb78e2..0d19dcaa 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -502,7 +502,7 @@ class NodeNG: ) -> Iterator[T_Nodes]: ... - def nodes_of_class( # type: ignore # mypy doesn't correctly recognize the overloads + def nodes_of_class( # type: ignore[misc] # mypy doesn't correctly recognize the overloads self, klass: Union[ Type[T_Nodes], diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index b67a9c94..ba4ca0a6 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -1215,7 +1215,7 @@ class TreeRebuilder: ) -> nodes.Tuple: """visit an ExtSlice node by returning a fresh instance of Tuple""" newnode = nodes.Tuple(ctx=Context.Load, parent=parent) - newnode.postinit([self.visit(dim, newnode) for dim in node.dims]) # type: ignore + newnode.postinit([self.visit(dim, newnode) for dim in node.dims]) # type: ignore[attr-defined] return newnode @overload @@ -1434,7 +1434,7 @@ class TreeRebuilder: # Not used in Python 3.9+. def visit_index(self, node: "ast.Index", parent: nodes.Subscript) -> NodeNG: """visit a Index node by returning a fresh instance of NodeNG""" - return self.visit(node.value, parent) # type: ignore + return self.visit(node.value, parent) # type: ignore[attr-defined] def visit_keyword(self, node: "ast.keyword", parent: NodeNG) -> nodes.Keyword: """visit a Keyword node by returning a fresh instance of it""" |
