From 5ea2649110f8c2841f4b38903a4fee3205496d63 Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 7 May 2024 19:21:50 +0200 Subject: [PATCH] apply --- .devtools/license | 7 ++++--- .pre-commit-config.yaml | 2 +- examples/anomaly_detection.py | 3 ++- examples/warm_start.py | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.devtools/license b/.devtools/license index f89c47f3c1..a63992e968 100755 --- a/.devtools/license +++ b/.devtools/license @@ -46,10 +46,11 @@ external_license = "# LICENSE: EXTERNAL" def check_file(path: Path) -> bool: - """Check whether `path` is complicit. + """ + Check whether `path` is complicit. - The license header needs to start on the 3rd line latest. This allows - to have a shebang on top of the file. + The license header needs to start on the 3rd line latest. This allows to + have a shebang on top of the file. """ num_lines = len(license.splitlines()) + 2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 059bb02fde..be0752d118 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: rev: v0.3.3 hooks: - id: ruff - name: Run Ruff (Flake8) + name: Run Ruff & fixing (Flake8) args: ["--fix"] - repo: https://github.com/PyCQA/docformatter diff --git a/examples/anomaly_detection.py b/examples/anomaly_detection.py index cb83318f73..455d1fddcb 100644 --- a/examples/anomaly_detection.py +++ b/examples/anomaly_detection.py @@ -13,8 +13,9 @@ """ This example shows how to do anomaly detection with DeepAR. -The model is first trained and then time-points with the largest negative log-likelihood are plotted. +The model is first trained and then time-points with the largest negative log- +likelihood are plotted. """ import numpy as np from functools import partial diff --git a/examples/warm_start.py b/examples/warm_start.py index fd425615a8..fba7be65a0 100644 --- a/examples/warm_start.py +++ b/examples/warm_start.py @@ -12,8 +12,8 @@ # permissions and limitations under the License. """ -This example show how to intialize the network with parameters from a model that was previously trained. - +This example show how to intialize the network with parameters from a model +that was previously trained. """ from gluonts.dataset.repository import get_dataset, dataset_recipes