Skip to content

Commit

Permalink
Improve type completeness (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanforbes authored Jul 25, 2022
1 parent 5ae66af commit e7f1a02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def from_int(cls: typing.Type[_BitString], x: int, length: int,
def __repr__(self) -> str:
return '<BitString {}>'.format(self.as_string())

__str__ = __repr__
__str__: typing.Callable[['BitString'], str] = __repr__

def __eq__(self, other: object) -> bool:
if not isinstance(other, BitString):
Expand Down Expand Up @@ -353,6 +353,8 @@ class Path:

__slots__ = '_is_closed', 'points'

points: typing.Tuple[Point, ...]

def __init__(self, *points: typing.Sequence[float],
is_closed: bool = False) -> None:
self.points = tuple(Point(*p) for p in points)
Expand Down

0 comments on commit e7f1a02

Please sign in to comment.