Skip to content

Commit a86de75

Browse files
format all files with black formatter
1 parent b6e73f5 commit a86de75

43 files changed

Lines changed: 4443 additions & 3572 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

schimpy/base_io.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
@outhor: Kijin Nam, knam@water.ca.gov
55
"""
66

7+
78
class BaseIO(object):
8-
""" Common IO routines to handle text inputs
9-
"""
9+
"""Common IO routines to handle text inputs"""
10+
1011
def __init__(self, logger=None):
11-
""" Constructor
12-
"""
12+
"""Constructor"""
1313
self._logger = logger
1414
self._lc = 0
1515

@@ -22,14 +22,14 @@ def linecounter(self, value):
2222
self._lc = value
2323

2424
def _read_and_parse_line(self, f, expected_count):
25-
""" Read in a line from a file handle and return parse tokens.
26-
A line will be parsed with whitespaces upto the expected count
27-
and the rest of the line will be not parsed and returned as
28-
one token.
29-
f = file handle
30-
expected_count = minimum expected count of parse tokens
31-
return = tokens and flag. If the number of tokens is
32-
more than the expected count, flag is True. Otherwise, False.
25+
"""Read in a line from a file handle and return parse tokens.
26+
A line will be parsed with whitespaces upto the expected count
27+
and the rest of the line will be not parsed and returned as
28+
one token.
29+
f = file handle
30+
expected_count = minimum expected count of parse tokens
31+
return = tokens and flag. If the number of tokens is
32+
more than the expected count, flag is True. Otherwise, False.
3333
"""
3434
line = f.readline()
3535
line = line.strip()

schimpy/batch_metrics.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,20 @@ def plot(self):
467467
idx = pd.IndexSlice
468468
sim_outputs[0] = sim_outputs[0].loc[:, idx[selected_stations, :]]
469469
self.logger.info("==================================================")
470-
self.logger.info("'selected_stations' enabled. Only following will be processed.")
470+
self.logger.info(
471+
"'selected_stations' enabled. Only following will be processed."
472+
)
471473
for station_id in selected_stations:
472474
self.logger.info(" {}".format(station_id))
473475

474476
if excluded_stations is not None:
475-
sim_outputs[0] = sim_outputs[0].loc[:, idx[~sim_outputs[0].columns.get_level_values(0).isin(excluded_stations), :]]
477+
sim_outputs[0] = sim_outputs[0].loc[
478+
:,
479+
idx[
480+
~sim_outputs[0].columns.get_level_values(0).isin(excluded_stations),
481+
:,
482+
],
483+
]
476484
self.logger.info("==================================================")
477485
self.logger.info("'excluded_stations' enabled. Following will be skipped.")
478486
for station_id in excluded_stations:

0 commit comments

Comments
 (0)