-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move extracting of trace points to rust
- Loading branch information
Showing
5 changed files
with
91 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
from typing import Self | ||
|
||
def decompress_7z_base64_data(value: str) -> bytes: | ||
"""Decompress base64 decoded 7z compressed string.""" | ||
|
||
class TracePoint: | ||
"""Trace point.""" | ||
|
||
def __new__(cls, x: float, y: float, connected: bool) -> Self: | ||
"""Create a new trace point.""" | ||
|
||
@property | ||
def x(self) -> float: | ||
"""X coordinate.""" | ||
|
||
@property | ||
def y(self) -> float: | ||
"""Y coordinate.""" | ||
|
||
@property | ||
def connected(self) -> float: | ||
"""If the point is connected.""" | ||
|
||
def extract_trace_points(value: str) -> list[TracePoint]: | ||
"""Extract trace points from 7z compressed data string.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters