Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] fixed ruff warnings #1408

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions neuralprophet/df_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def check_dataframe(
"Automatically removed variable."
)
regressors_to_remove.append(reg)
if type(regressors) is list:
if isinstance(regressors, list):
columns.extend(regressors)
else: # treat as dict
columns.extend(regressors.keys())
Expand All @@ -489,12 +489,12 @@ def check_dataframe(
"Automatically removed variable."
)
lag_regressors_to_remove.append(covar)
if type(covariates) is list:
if isinstance(covariates, list):
columns.extend(covariates)
else: # treat as dict
columns.extend(covariates.keys())
if events is not None:
if type(events) is list:
if isinstance(events, list):
columns.extend(events)
else: # treat as dict
columns.extend(events.keys())
Expand Down
4 changes: 2 additions & 2 deletions neuralprophet/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ def get_valid_configuration( # move to utils
valid_configuration: dict
dict of validated components and values to be plotted
"""
if type(valid_set) is not list:
if not isinstance(valid_set, list):
valid_set = [valid_set]

if components is None:
components = valid_set
components = check_if_configured(m=m, components=components)
else:
if type(components) is not list:
if not isinstance(components, list):
components = [components]
components = [comp.lower() for comp in components]
for comp in components:
Expand Down