Skip to content

Commit

Permalink
add flake8-bugbear (#690)
Browse files Browse the repository at this point in the history
* add flake8-bugbear

* remove mutabe; use bugbear instead

* update deps

* remove useless variable

* change error type
  • Loading branch information
iKintosh authored May 25, 2022
1 parent 91edf5b commit c54dbb3
Show file tree
Hide file tree
Showing 5 changed files with 299 additions and 278 deletions.
6 changes: 3 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ignore = F, E203, W605, E501, W503, D100, D104
max-line-length = 121
max-complexity = 18
docstring-convention=numpy
select = E, W, C, F401, N, D101, D102, D103, D200, D201, D202, D206, D207, D208, D209, D300, D400, D401, D402, D403, D404, D405, D414, D413, D417, D409, M511
select = E, W, C, B, F401, N, D101, D102, D103, D200, D201, D202, D206, D207, D208, D209, D300, D400, D401, D402, D403, D404, D405, D414, D413, D417, D409
per-file-ignores=
__init__.py:F401
backtest_command.py:M511
forecast_command.py:M511
etna/commands/forecast_command.py:B008
etna/commands/backtest_command.py:B008
2 changes: 1 addition & 1 deletion etna/analysis/plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def plot_forecast(

# plot forecast plot for each of given forecasts
quantile_prefix = "target_"
for j, (forecast_name, forecast) in enumerate(forecast_results.items()):
for forecast_name, forecast in forecast_results.items():
legend_prefix = f"{forecast_name}: " if num_forecasts > 1 else ""

segment_forecast_df = forecast[:, segment, :][segment].sort_values(by="timestamp")
Expand Down
2 changes: 1 addition & 1 deletion etna/transforms/timestamp/special_days.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, find_special_weekday: bool = True, find_special_month_day: bo
elif self.find_special_month_day:
self.res_type = {"df_sample": 0, "columns": ["anomaly_monthdays"]}
else:
assert False, "nothing to do"
raise ValueError("nothing to do")

def fit(self, df: pd.DataFrame) -> "_OneSegmentSpecialDaysTransform":
"""
Expand Down
Loading

1 comment on commit c54dbb3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.