Skip to content

Commit

Permalink
Propitiate flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
evansd committed Sep 11, 2023
1 parent b42c2ff commit 6afcca1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ def __init__(
numerator_column: str = "chemical",
denominator_column: str = "subpara",
) -> None:
assert (
type(to_date) == date and type(from_date) == date
assert isinstance(to_date, date) and isinstance(
from_date, date
), "date args must be dates"
assert to_date > from_date, "to date must be after from date"
self.from_date = from_date
Expand Down Expand Up @@ -705,7 +705,7 @@ def _get_entity_measure_arrays(self, entity: str) -> None:
print(f"Error getting BQ data for {entity}")
traceback.print_stack()
try:
if type(res.iloc[0]["array"]) != np.ndarray:
if not isinstance(res.iloc[0]["array"], np.ndarray):
res["array"] = res["array"].apply(
lambda x: np.fromstring(x[1:-1], sep=",")
)
Expand Down

0 comments on commit 6afcca1

Please sign in to comment.