Skip to content

Commit

Permalink
Fix for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcharnock committed May 28, 2024
1 parent 5af8b59 commit 66dbe6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hordak/utilities/account_codes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import string
from typing import List

from hordak.exceptions import NoMoreAccountCodesAvailableInSequence

Expand Down Expand Up @@ -27,11 +28,11 @@ def __init__(self, start_at: str, alpha=False):
def reset_iterator(self):
self.current = self._to_list(self.start_at)

def _to_list(self, value: str) -> list[int]:
def _to_list(self, value: str) -> List[int]:
# "0A" -> (0, 10)
return [self.chars.index(v) for v in value]

def _to_str(self, value: list[int]) -> str:
def _to_str(self, value: List[int]) -> str:
# (0, 10) -> "0A"
return "".join([self.chars[i] for i in value])

Expand Down

0 comments on commit 66dbe6a

Please sign in to comment.