diff options
| author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-05 07:38:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-05 07:38:09 +0200 |
| commit | 569b63706ea5ab7efab7ffe2ef91e6772c5e38ec (patch) | |
| tree | 4239de4f5dd5f94234786b0cb5ec6dbda028deda /astroid/nodes/node_classes.py | |
| parent | fc278f79f2981066c79213815efe1a25550360db (diff) | |
| download | astroid-git-569b63706ea5ab7efab7ffe2ef91e6772c5e38ec.tar.gz | |
Type ``igetattr`` (#2101)
Diffstat (limited to 'astroid/nodes/node_classes.py')
| -rw-r--r-- | astroid/nodes/node_classes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index 8092abcf..2b24d8ef 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -11,7 +11,7 @@ import itertools import sys import typing import warnings -from collections.abc import Generator, Iterable, Mapping +from collections.abc import Generator, Iterable, Iterator, Mapping from functools import lru_cache from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Union @@ -3237,14 +3237,14 @@ class Slice(NodeNG): """ return "builtins.slice" - def igetattr(self, attrname, context: InferenceContext | None = None): + def igetattr( + self, attrname: str, context: InferenceContext | None = None + ) -> Iterator[SuccessfulInferenceResult]: """Infer the possible values of the given attribute on the slice. :param attrname: The name of the attribute to infer. - :type attrname: str :returns: The inferred possible values. - :rtype: iterable(NodeNG) """ if attrname == "start": yield self._wrap_attribute(self.lower) |
