Skip to content

Commit

Permalink
ruff: format
Browse files Browse the repository at this point in the history
  • Loading branch information
jvansanten committed Nov 29, 2024
1 parent f381a6c commit e8b87c7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
9 changes: 8 additions & 1 deletion ampel/lsst/alert/load/ElasticcTrainingsetLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,14 @@ def __init__(self, **kwargs) -> None:
)

if self.skip_transients != 0:
next(islice(self.lightcurves, self.skip_transients, self.skip_transients), None)
next(
islice(
self.lightcurves,
self.skip_transients,
self.skip_transients,
),
None,
)

self.next_lightcurve()

Expand Down
6 changes: 3 additions & 3 deletions ampel/lsst/alert/load/KafkaAlertLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class StaticSchemaURL(AmpelBaseModel):

class SASLAuthentication(AmpelBaseModel):
protocol: Literal["SASL_PLAINTEXT", "SASL_SSL"] = "SASL_PLAINTEXT"
mechanism: Literal[
"PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512"
] = "SCRAM-SHA-512"
mechanism: Literal["PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512"] = (
"SCRAM-SHA-512"
)
username: NamedSecret[str]
password: NamedSecret[str]

Expand Down
8 changes: 4 additions & 4 deletions ampel/lsst/alert/load/MultiAvroAlertLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def __init__(self, **kwargs) -> None:
self.set_alert_source(self.loader)

def set_alert_source(self, loader) -> None:
self.alert_loader: AbsAlertLoader[
Iterable[IOBase]
] = AuxUnitRegister.new_unit( # type: ignore
model=loader
self.alert_loader: AbsAlertLoader[Iterable[IOBase]] = (
AuxUnitRegister.new_unit( # type: ignore
model=loader
)
)
self.next_file()

Expand Down
4 changes: 3 additions & 1 deletion ampel/lsst/t0/SimpleLSSTFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class SimpleLSSTFilter(CatalogMatchUnit, AbsAlertFilter):
# Gaia
gaia_rs: float # search radius for GAIA DR2 matching [arcsec]
gaia_pm_signif: float # significance of proper motion detection of GAIA counterpart [sigma]
gaia_plx_signif: float # significance of parallax detection of GAIA counterpart [sigma]
gaia_plx_signif: (
float # significance of parallax detection of GAIA counterpart [sigma]
)
gaia_veto_gmag_min: float # min gmag for normalized distance cut of GAIA counterparts [mag]
gaia_veto_gmag_max: float # max gmag for normalized distance cut of GAIA counterparts [mag]
gaia_excessnoise_sig_max: float # maximum allowed noise (expressed as significance) for Gaia match to be trusted.
Expand Down

0 comments on commit e8b87c7

Please sign in to comment.