mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-06 10:09:52 +02:00
Fix code style.
This commit is contained in:
parent
c9fe5e55b6
commit
2667ee9d02
16 changed files with 228 additions and 240 deletions
|
@ -43,7 +43,7 @@ def parse_vector(text: str) -> Optional[np.array]:
|
|||
return None
|
||||
|
||||
|
||||
def rotation_matrix(angle):
|
||||
def rotation_matrix(angle) -> np.array:
|
||||
"""
|
||||
Get a matrix to rotate 2D vector by the angle.
|
||||
|
||||
|
@ -100,7 +100,7 @@ class Sector:
|
|||
|
||||
return ["L", start, "A", radius, radius, 0, "0", 0, end]
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return f"{self.start}-{self.end}"
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ class DirectionSet:
|
|||
"""
|
||||
self.sectors: Iterator[Optional[Sector]] = map(Sector, text.split(";"))
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return ", ".join(map(str, self.sectors))
|
||||
|
||||
def draw(self, center: np.array, radius: float) -> Iterator[List[Path]]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue