This repository has been archived by the owner on May 10, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c63981
commit 8fefed6
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from __future__ import annotations | ||
|
||
import logging | ||
from typing import ( | ||
TYPE_CHECKING, | ||
) | ||
from .constants import ( | ||
MAX_FLOAT, | ||
) | ||
|
||
if TYPE_CHECKING: | ||
from typing import ( | ||
Dict, | ||
Any, | ||
) | ||
from .positions import ( | ||
Position, | ||
) | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Service(object): | ||
__slots__ = ( | ||
'position', | ||
'earliest', | ||
'latest', | ||
'duration', | ||
) | ||
identifier: str | ||
position: Position | ||
earliest: float | ||
latest: float | ||
duration: float | ||
|
||
def __init__(self, position: Position, earliest: float = 0.0, latest: float = MAX_FLOAT, duration: float = 0.0): | ||
self.position = position | ||
self.earliest = earliest | ||
self.latest = latest | ||
self.duration = duration | ||
|
||
def __deepcopy__(self, memo: Dict[int, Any]) -> Service: | ||
return self |
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