From 5749e1dcfa33eec5fb526587857b86232ecc24a6 Mon Sep 17 00:00:00 2001 From: clearml <> Date: Wed, 29 Jan 2025 23:19:50 +0200 Subject: [PATCH] PEP8 --- clearml/binding/artifacts.py | 3 +-- clearml/router/router.py | 2 +- clearml/task.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clearml/binding/artifacts.py b/clearml/binding/artifacts.py index 2d04a80d..5257e3b5 100644 --- a/clearml/binding/artifacts.py +++ b/clearml/binding/artifacts.py @@ -1139,7 +1139,6 @@ class Artifacts(object): temp_folder, prefix, suffix = self._temp_files_lookup.pop(local_filename) fd, temp_filename = mkstemp(prefix=prefix, suffix=suffix) os.close(fd) - for i in range(self._max_tmp_file_replace_attemps): try: os.replace(local_filename, temp_filename) @@ -1151,7 +1150,7 @@ class Artifacts(object): ) ) else: - # final attempt, and if it fails, throw an exception + # final attempt, and if it fails, throw an exception. # exception could be thrown on some Windows systems os.replace(local_filename, temp_filename) local_filename = temp_filename diff --git a/clearml/router/router.py b/clearml/router/router.py index 7f3a9117..74757fac 100644 --- a/clearml/router/router.py +++ b/clearml/router/router.py @@ -1,4 +1,4 @@ -from typing import Optional, Callable, Dict, Union # noqa +from typing import Optional, Callable, Dict, Union, List # noqa from fastapi import Request, Response # noqa from .proxy import HttpProxy diff --git a/clearml/task.py b/clearml/task.py index f0f7211f..fce2c50c 100644 --- a/clearml/task.py +++ b/clearml/task.py @@ -113,7 +113,7 @@ if TYPE_CHECKING: import pandas import numpy from PIL import Image - from .router.router import HttpRouter + from .router.router import HttpRouter # noqa: F401 # Forward declaration to help linters TaskInstance = TypeVar("TaskInstance", bound="Task")