Skip to content

Commit

Permalink
refactor: more type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jun 28, 2023
1 parent e9afab8 commit 79dbd36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/awkward/types/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ def show(self, stream=sys.stdout):

_str_parameters_exclude = ("__categorical__",)

def _str_categorical_begin(self):
def _str_categorical_begin(self) -> str:
if self.parameter("__categorical__") is not None:
return "categorical[type="
else:
return ""

def _str_categorical_end(self):
def _str_categorical_end(self) -> str:
if self.parameter("__categorical__") is not None:
return "]"
else:
return ""

def _str_parameters(self):
def _str_parameters(self) -> str:
out = []
if self._parameters is not None:
for k, v in self._parameters.items():
Expand All @@ -72,7 +72,7 @@ def _str_parameters(self):
else:
return "parameters={" + ", ".join(out) + "}"

def _repr_args(self):
def _repr_args(self) -> list[str]:
out = []

if self._parameters is not None and len(self._parameters) > 0:
Expand Down

0 comments on commit 79dbd36

Please sign in to comment.