sktime/sktime

[BUG] Mutable Default in _convtimenet_backbone.py:166:21

オープン

#10,729 opened on 2026/08/02

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)Python (1,192 件のフォーク)batch import
buggood first issue

Repository metrics

Stars
 (7,162 個のスター)
PR merge metrics
 (平均マージ 26d 10h) (30d で 86 merged PRs)

説明

See the following ruff output:

B006 Do not use mutable data structures for argument defaults
   --> sktime/networks/convtimenet/_convtimenet_backbone.py:166:21
    |
164 |         d_model,
165 |         d_ff,
166 |         kernel_size=[19, 19, 29, 29, 37, 37],
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^
167 |         dropout=0.1,
168 |         activation="gelu",
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/networks/convtimenet/_convtimenet_backbone.py:214:15
    |
212 |         fc_dropout: float = 0.0,
213 |         enable_res_param=False,
214 |         dw_ks=[7, 13, 19],
    |               ^^^^^^^^^^^
215 |         norm="batch",
216 |         use_embed=True,
    |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
  --> sktime/networks/convtimenet/forecaster/_convtimenet_backbone.py:37:15
   |
35 |         stride: int,
36 |         n_layers: int = 6,
37 |         dw_ks=[9, 11, 15, 21, 29, 39],
   |               ^^^^^^^^^^^^^^^^^^^^^^^
38 |         d_model=64,
39 |         d_ff: int = 256,
   |
help: Replace with `None`; initialize within function

B006 Do not use mutable data structures for argument defaults
   --> sktime/networks/convtimenet/forecaster/_convtimenet_backbone.py:162:21
    |
160 |         patch_num,
161 |         patch_len,
162 |         kernel_size=[11, 15, 21, 29, 39, 51],
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^
163 |         n_layers=6,
164 |         d_model=128,
    |
help: Replace with `None`; initialize within function

コントリビューターガイド