Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Apr 5, 2024
1 parent 4065259 commit dd8fc16
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
}

if os.environ.get("GITHUB_REF_NAME") == "dev":
html_theme_options[
"announcement"
] = "<strong>Note:</strong> You are looking at the development docs."
html_theme_options["announcement"] = (
"<strong>Note:</strong> You are looking at the development docs."
)


# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
1 change: 0 additions & 1 deletion examples/anomaly_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""
import numpy as np
from itertools import islice
from functools import partial
import mxnet as mx
import matplotlib.pyplot as plt
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ filterwarnings = "ignore"

[tool.ruff]
line-length = 79
include = ["src"]
lint.ignore = [
"E501", # line-length is handled by black
"E741" # TODO: remove usage of `l`
]
exclude = ["src/gluonts/nursery"]
exclude = ["src/gluonts/nursery"] # todo
[tool.ruff.lint.per-file-ignores]
"examples/*" = ["E402"]


[tool.docformatter]
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def run(self):
import mypy.api

excluded_folders = [
str(p.parent.relative_to(ROOT)) for p in ROOT.glob("src/**/.typeunsafe")
str(p.parent.relative_to(ROOT))
for p in ROOT.glob("src/**/.typeunsafe")
]

if len(excluded_folders) > 0:
Expand Down
10 changes: 5 additions & 5 deletions test/core/test_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def __init__(self, x: float, y: float) -> None:
self.x = x
self.y = y

assert type(self.x) == float
assert type(self.y) == float
assert isinstance(self.x, float)
assert isinstance(self.y, float)

def __eq__(self, that):
return self.x == that.x and self.y == that.y
Expand All @@ -41,9 +41,9 @@ def __init__(self, a: int, c: Complex, **kwargs) -> None:
self.b = kwargs["b"]
self.c = c

assert type(self.a) == int
assert type(self.b) == float
assert type(self.c) == Complex
assert isinstance(self.a, int)
assert isinstance(self.b, float)
assert isinstance(self.c, Complex)

def __eq__(self, that):
return self.a == that.a and self.b == that.b and self.c == that.c
Expand Down
2 changes: 1 addition & 1 deletion test/ev/test_metrics_compared_to_previous_approach.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def get_data_batches(predictor, test_data):
)

seasonality = get_seasonality(freq=forecast.start_date.freqstr)
freq = forecast.start_date.freqstr
# freq = forecast.start_date.freqstr
other_data = {
"label": np.array([label["target"]]),
"seasonal_error": np.array(
Expand Down
4 changes: 2 additions & 2 deletions test/ext/hierarchicalforecast/test_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_predictor_serialization(
):
train_datasets = sine7(nonnegative=True)

(train_dataset, test_dataset, metadata) = (
_, _, metadata = (
train_datasets.train,
train_datasets.test,
train_datasets.metadata,
Expand Down Expand Up @@ -152,7 +152,7 @@ def test_predictor_working(
bias=1,
)

(train_dataset, test_dataset, metadata) = (
_, test_dataset, metadata = (
train_datasets.train,
train_datasets.test,
train_datasets.metadata,
Expand Down
2 changes: 1 addition & 1 deletion test/mx/model/deepvar_hierarchical/test_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ def test_projection_mat(D):
)
def test_projection_mat_expected_fail(D):
with pytest.raises(AssertionError):
p = projection_mat(S=S, D=D)
projection_mat(S=S, D=D)
2 changes: 1 addition & 1 deletion test/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_join_items():
]

with pytest.raises(Exception):
oin_items(left, right, "strict")
oin_items(left, right, "strict") # noqa: F821


@pytest.mark.parametrize(
Expand Down
1 change: 0 additions & 1 deletion test/zebras/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

import pytest

import numpy as np

Expand Down

0 comments on commit dd8fc16

Please sign in to comment.