Skip to content

Commit

Permalink
clean format with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
mroberge committed Jun 14, 2023
1 parent f24ff41 commit 1c7c60a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/hydrofunctions/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def __init__(
file=None,
verbose=True,
):

self.ok = False
if file:
if len(file.split(".")) == 1:
Expand Down Expand Up @@ -150,7 +149,9 @@ def __init__(
)
try:
self.json = self.response.json()
self._dataframe, self.meta = hf.extract_nwis_df(self.json, interpolate=interpolate)
self._dataframe, self.meta = hf.extract_nwis_df(
self.json, interpolate=interpolate
)
self.ok = self.response.ok
if file is not None:
self.save(file)
Expand Down Expand Up @@ -241,23 +242,29 @@ def df(self, *args):
meta = all_cols
break # If one param is 'all', ignore the other params and deliver everything.
elif item == "discharge":
if not np.any(['00060' in x for x in list(self._dataframe.columns)]):
if not np.any(
["00060" in x for x in list(self._dataframe.columns)]
):
raise ValueError(
"The parameter '{param}' is not contained in this dataset.".format(
param=item
)
)
params = Q_cols | params
elif item == "q":
if not np.any(['00060' in x for x in list(self._dataframe.columns)]):
if not np.any(
["00060" in x for x in list(self._dataframe.columns)]
):
raise ValueError(
"The parameter '{param}' is not contained in this dataset.".format(
param=item
)
)
params = Q_cols | params
elif item == "stage":
if not np.any(['00065' in x for x in list(self._dataframe.columns)]):
if not np.any(
["00065" in x for x in list(self._dataframe.columns)]
):
raise ValueError(
"The parameter '{param}' is not contained in this dataset.".format(
param=item
Expand Down

0 comments on commit 1c7c60a

Please sign in to comment.