Skip to content

Commit 9d20217

Browse files
committed
fixing linting errors
1 parent 18153aa commit 9d20217

40 files changed

+1809
-1153
lines changed

docs/source/conf.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ def get_by_name(string: str):
9494
"""
9595
Import by name and return imported module/function/class
9696
97-
Args:
98-
string (str): module/function/class to import, e.g. 'pandas.read_csv' will return read_csv function as
99-
defined by pandas
100-
101-
Returns:
97+
Parameters
98+
----------
99+
string (str):
100+
module/function/class to import, e.g. 'pandas.read_csv'
101+
will return read_csv function as defined by pandas
102+
103+
Returns
104+
-------
102105
imported object
103106
"""
104107
class_name = string.split(".")[-1]

examples/ar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
# deepar.hparams.log_val_interval = -1
9999
# trainer.limit_train_batches = 1.0
100100
# res = Tuner(trainer).lr_find(
101-
# deepar, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5, max_lr=1e2
101+
# deepar, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5, max_lr=1e2 # noqa: E501
102102
# )
103103

104104
# print(f"suggested learning rate: {res.suggestion()}")

examples/nbeats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
# trainer.limit_train_batches = 1.0
8888
# # run learning rate finder
8989
# res = Tuner(trainer).lr_find(
90-
# net, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5, max_lr=1e2
90+
# net, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5, max_lr=1e2 # noqa: E501
9191
# )
9292
# print(f"suggested learning rate: {res.suggestion()}")
9393
# fig = res.plot(show=True, suggest=True)

examples/stallion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
data["avg_volume_by_agency"] = data.groupby(
3535
["time_idx", "agency"], observed=True
3636
).volume.transform("mean")
37-
# data = data[lambda x: (x.sku == data.iloc[0]["sku"]) & (x.agency == data.iloc[0]["agency"])]
37+
# data = data[lambda x: (x.sku == data.iloc[0]["sku"]) & (x.agency == data.iloc[0]["agency"])] # noqa: E501
3838
special_days = [
3939
"easter_day",
4040
"good_friday",
@@ -151,7 +151,7 @@
151151
# trainer.limit_train_batches = 1.0
152152
# # run learning rate finder
153153
# res = Tuner(trainer).lr_find(
154-
# tft, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5, max_lr=1e2
154+
# tft, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5, max_lr=1e2 # noqa: E501
155155
# )
156156
# print(f"suggested learning rate: {res.suggestion()}")
157157
# fig = res.plot(show=True, suggest=True)

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ exclude = [
136136
".venv/",
137137
".git/",
138138
".history/",
139+
"docs/source/tutorials/",
139140
]
141+
target-version = "py39"
140142

141143
[tool.ruff.lint]
142144
select = ["E", "F", "W", "C4", "S"]
@@ -188,3 +190,6 @@ exclude = '''
188190
[tool.nbqa.mutate]
189191
ruff = 1
190192
black = 1
193+
194+
[tool.nbqa.exclude]
195+
ruff = "docs/source/tutorials/" # ToDo: Remove this when fixing notebooks

pytorch_forecasting/data/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Datasets, etc. for timeseries data.
33
4-
Handling timeseries data is not trivial. It requires special treatment. This sub-package provides the necessary tools
5-
to abstracts the necessary work.
4+
Handling timeseries data is not trivial. It requires special treatment.
5+
This sub-package provides the necessary tools to abstracts the necessary work.
66
"""
77

88
from pytorch_forecasting.data.encoders import (

0 commit comments

Comments
 (0)