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")