-
Notifications
You must be signed in to change notification settings - Fork 1
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
e9394cd
commit 87bdd05
Showing
4 changed files
with
31 additions
and
25 deletions.
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
# Last Modified Date: 17.06.2021 | ||
# Last Modified By: valery brinnel <[email protected]> | ||
|
||
from dataclasses import dataclass, field | ||
from typing import TYPE_CHECKING, Any | ||
|
||
from ampel.view.LightCurve import LightCurve | ||
|
@@ -23,24 +24,12 @@ | |
from ampel.view.T2DocView import T2DocView | ||
|
||
|
||
@dataclass(frozen=True) | ||
class TransientView(SnapView): | ||
|
||
__slots__ = "lightcurve", | ||
|
||
lightcurve: "None | Sequence[LightCurve]" | ||
|
||
def __init__( | ||
self, | ||
id: "StockId", | ||
stock: "None | StockDocument" = None, | ||
origin: "None | OneOrMany[int]" = None, | ||
t0: "None | Sequence[DataPoint]" = None, | ||
t1: "None | Sequence[T1Document]" = None, | ||
t2: "None | Sequence[T2DocView]" = None, | ||
logs: "None | Sequence[LogDocument]" = None, | ||
extra: "None | dict[str, Any]" = None | ||
): | ||
super().__init__(id, stock=stock, origin=origin, t0=t0, t1=t1, t2=t2, logs=logs, extra=extra) | ||
lightcurve: "None | Sequence[LightCurve]" = field(init=False) | ||
|
||
def __post_init__(self): | ||
|
||
if self.t0 and self.t1: | ||
lightcurve: None | Sequence[LightCurve] = tuple( | ||
|
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