Skip to content

Commit

Permalink
Fixed type checking error
Browse files Browse the repository at this point in the history
The use of an ellipsis in type annotation was not allowed when testing this program on linux. It has been replaced with NoneType.
  • Loading branch information
tomas committed Mar 24, 2024
1 parent 90cfdaa commit 2d29619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/custom_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Placement(TypedDict):
word: str
direction: str
pos: Tuple[int]
intersections: Union[List[...], List[Tuple[int]]]
intersections: Union[List[None], List[Tuple[int]]]

class CrosswordData(TypedDict):
'''The JSON serialised definitions and info of a base crossword.'''
Expand Down
2 changes: 1 addition & 1 deletion src/cword_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _find_intersections(self,
direction: str,
row: int,
column: int
) -> Union[Tuple[...], Tuple[int]]:
) -> Union[Tuple[None], Tuple[int]]:
'''Find the row and column of all points of intersection that the `word` has with the `self.grid`.'''
intersections = list()

Expand Down

0 comments on commit 2d29619

Please sign in to comment.