Skip to content

Commit fd0e65f

Browse files
committed
lint
1 parent 0c18eb0 commit fd0e65f

File tree

28 files changed

+34
-16
lines changed

28 files changed

+34
-16
lines changed

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ignore=baselines,assets,checkpoints,examples,scripts
1212

1313
# Files or directories matching the regex patterns are skipped. The regex
1414
# matches against base names, not paths.
15-
ignore-patterns=^\.|^_|^.*\.md|^.*\.txt|^.*\.csv|^.*\.CFF|^LICENSE
15+
ignore-patterns=^\.|^_|^.*\.md|^.*\.txt|^.*\.csv|^.*\.CFF|^LICENSE|^.*\.toml
1616

1717
# Pickle collected data for later comparisons.
1818
persistent=no

src/basicts/configs/base_config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@
99
from functools import partial
1010
from numbers import Number
1111
from types import FunctionType
12-
from typing import Callable, List, Literal, Optional, Tuple, TYPE_CHECKING, Union
12+
from typing import (TYPE_CHECKING, Callable, List, Literal, Optional, Tuple,
13+
Union)
1314

1415
import numpy as np
1516
import torch
1617
from easydict import EasyDict
1718
from torch.optim.lr_scheduler import LRScheduler
1819

20+
from .model_config import BasicTSModelConfig
21+
1922
# avoid circular imports
2023
if TYPE_CHECKING:
2124
from basicts.runners.callback import BasicTSCallback
2225
from basicts.runners.taskflow import BasicTSTaskFlow
2326

24-
from .model_config import BasicTSModelConfig
2527

2628

2729
@dataclass(init=False)

src/basicts/data/blast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ def __getitem__(self, idx: int) -> tuple:
244244

245245
def __len__(self):
246246
return self.data.shape[0]
247-
247+
248248
def __getstate__(self):
249249
state = self.__dict__.copy()
250-
del state['_data']
250+
del state["_data"]
251251
return state
252-
252+
253253
def __setstate__(self, state):
254254
self.__dict__.update(state)
255255
self._data = self._load_data()

src/basicts/models/DUET/arch/mahalanobis_mask.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=not-callable
12
import torch
23
import torch.nn.functional as F
34
from einops import rearrange

src/basicts/models/FITS/arch/fits_arch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=not-callable
12
from typing import Callable, Dict
23

34
import torch

src/basicts/models/FiLM/arch/film_arch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=not-callable
12
import numpy as np
23
import torch
34
import torch.nn.functional as F

src/basicts/models/FiLM/config/film_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from dataclasses import dataclass, field
2-
from typing import Sequence
32

43
from basicts.configs import BasicTSModelConfig
54

src/basicts/models/FreTS/arch/frets_arch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=not-callable
12
import torch
23
from torch import nn
34
from torch.nn import functional as F

src/basicts/models/Koopa/arch/layers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=not-callable
12
import math
23

34
import torch

src/basicts/models/Koopa/config/koopa_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ class KoopaConfig(BasicTSModelConfig):
1717
dynamic_dim: int = field(default=64, metadata={"help": "Dynamic feature dimension. Must be > 0."})
1818
hidden_dim: int = field(default=64, metadata={"help": "Hidden dimension."})
1919
hidden_layers: int = field(default=2, metadata={"help": "Number of hidden layers (>=2 recommended)."})
20-
multistep: bool = field(default=False, metadata={"help": "Whether to use multistep forecasting."})
20+
multistep: bool = field(default=False, metadata={"help": "Whether to use multistep forecasting."})

0 commit comments

Comments
 (0)