Skip to content

Commit

Permalink
Implement display_type() on Slice (#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls authored Jan 28, 2024
1 parent a82d9d9 commit d910562
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions astroid/nodes/node_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3564,6 +3564,13 @@ def pytype(self) -> Literal["builtins.slice"]:
"""
return "builtins.slice"

def display_type(self) -> Literal["Slice"]:
"""A human readable type of this node.
:returns: The type of this node.
"""
return "Slice"

def igetattr(
self, attrname: str, context: InferenceContext | None = None
) -> Iterator[SuccessfulInferenceResult]:
Expand Down

0 comments on commit d910562

Please sign in to comment.