Skip to content

Commit

Permalink
Remove duplicate code, fix comment (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 authored Jun 9, 2021
1 parent 25758c4 commit 6b1b69c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions ecgtools/parsers/cesm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,7 @@ class Stream:


# Make sure to sort the streams in reverse, the reverse=True is required so as
# not to confuse `pop.h.ecosys.nday1` and `pop.h.ecosys.nday1` when looping over
# the list of streams in the parsing function

CESM_STREAMS = [
Stream(name=key, component=value['component'], frequency=value['frequency'])
for key, value in sorted(_STREAMS_DICT.items(), reverse=True)
]


@dataclasses.dataclass
class Stream:
name: str
component: str
frequency: str


# Make sure to sort the streams in reverse, the reverse=True is required so as
# not to confuse `pop.h.ecosys.nday1` and `pop.h.ecosys.nday1` when looping over
# not to confuse `pop.h` and `pop.h.ecosys.nday1` when looping over
# the list of streams in the parsing function

CESM_STREAMS = [
Expand Down

0 comments on commit 6b1b69c

Please sign in to comment.