Skip to content

Commit

Permalink
feat(python): Minor update to Array data type repr (#12973)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Dec 10, 2023
1 parent 9cf0882 commit 8abbeab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py-polars/polars/datatypes/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def __eq__(self, other: PolarsDataType) -> bool: # type: ignore[override]
return False

def __hash__(self) -> int:
return hash((self.__class__, *self.categories))
return hash((self.__class__, tuple(self.categories)))

def __repr__(self) -> str:
class_name = self.__class__.__name__
Expand Down Expand Up @@ -694,7 +694,7 @@ def __hash__(self) -> int:

def __repr__(self) -> str:
class_name = self.__class__.__name__
return f"{class_name}({self.inner!r}, {self.width})"
return f"{class_name}({self.inner!r}, width={self.width})"


class Field:
Expand Down

0 comments on commit 8abbeab

Please sign in to comment.