Skip to content

Commit e7f1a02

Browse files
authored
Improve type completeness (#15)
1 parent 5ae66af commit e7f1a02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

types.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def from_int(cls: typing.Type[_BitString], x: int, length: int,
208208
def __repr__(self) -> str:
209209
return '<BitString {}>'.format(self.as_string())
210210

211-
__str__ = __repr__
211+
__str__: typing.Callable[['BitString'], str] = __repr__
212212

213213
def __eq__(self, other: object) -> bool:
214214
if not isinstance(other, BitString):
@@ -353,6 +353,8 @@ class Path:
353353

354354
__slots__ = '_is_closed', 'points'
355355

356+
points: typing.Tuple[Point, ...]
357+
356358
def __init__(self, *points: typing.Sequence[float],
357359
is_closed: bool = False) -> None:
358360
self.points = tuple(Point(*p) for p in points)

0 commit comments

Comments
 (0)