summaryrefslogtreecommitdiff
path: root/astroid/objects.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-06-05 23:58:53 +0200
committerGitHub <noreply@github.com>2022-06-05 23:58:53 +0200
commit20adb5420d29b7ad9528941c1eb391e58e004db3 (patch)
treef88b8b22a4c9fcd075012cf056b765e8fef41473 /astroid/objects.py
parent9b114ad611e4f5c58551dbdcb3cf344b7731dec6 (diff)
downloadastroid-git-20adb5420d29b7ad9528941c1eb391e58e004db3.tar.gz
Add typing to ``NodeNG._infer`` and associated nodes (#1541)
Diffstat (limited to 'astroid/objects.py')
-rw-r--r--astroid/objects.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/astroid/objects.py b/astroid/objects.py
index 6f9637c8..88c019e4 100644
--- a/astroid/objects.py
+++ b/astroid/objects.py
@@ -15,7 +15,7 @@ from __future__ import annotations
import sys
from collections.abc import Iterator
-from typing import TypeVar
+from typing import Any, TypeVar
from astroid import bases, decorators, util
from astroid.context import InferenceContext
@@ -44,7 +44,7 @@ class FrozenSet(node_classes.BaseContainer):
def pytype(self):
return "builtins.frozenset"
- def _infer(self, context=None):
+ def _infer(self, context=None, **kwargs: Any):
yield self
@cached_property
@@ -77,7 +77,7 @@ class Super(node_classes.NodeNG):
self._scope = scope
super().__init__()
- def _infer(self, context=None):
+ def _infer(self, context=None, **kwargs: Any):
yield self
def super_mro(self):
@@ -331,5 +331,7 @@ class Property(scoped_nodes.FunctionDef):
def infer_call_result(self, caller=None, context=None):
raise InferenceError("Properties are not callable")
- def _infer(self: _T, context: InferenceContext | None = None) -> Iterator[_T]:
+ def _infer(
+ self: _T, context: InferenceContext | None = None, **kwargs: Any
+ ) -> Iterator[_T]:
yield self