Skip to content

Commit 8d37dab

Browse files
committed
rm unnecessary comparisons
1 parent f702b2e commit 8d37dab

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/stagpy/step.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,10 @@ def __getitem__(self, name: str) -> Field:
336336

337337
def __contains__(self, item: Any) -> bool:
338338
try:
339-
return self[item] is not None
339+
_ = self[item]
340340
except error.MissingDataError:
341341
return False
342+
return True
342343

343344
def __eq__(self, other: object) -> bool:
344345
return self is other

src/stagpy/time_series.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ def compstat(
125125
def cmd(conf: Config) -> None:
126126
"""Implementation of time subcommand."""
127127
sdat = _sdat_from_conf(conf.core)
128-
if sdat.tseries is None:
129-
return
130-
131128
if conf.time.fraction is not None:
132129
if not 0 < conf.time.fraction <= 1:
133130
raise InvalidTimeFractionError(conf.time.fraction)

0 commit comments

Comments
 (0)