mirror of
https://github.com/clearml/clearml
synced 2025-01-31 00:56:57 +00:00
PEP8
This commit is contained in:
parent
01736190c9
commit
5749e1dcfa
@ -1139,7 +1139,6 @@ class Artifacts(object):
|
|||||||
temp_folder, prefix, suffix = self._temp_files_lookup.pop(local_filename)
|
temp_folder, prefix, suffix = self._temp_files_lookup.pop(local_filename)
|
||||||
fd, temp_filename = mkstemp(prefix=prefix, suffix=suffix)
|
fd, temp_filename = mkstemp(prefix=prefix, suffix=suffix)
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
|
|
||||||
for i in range(self._max_tmp_file_replace_attemps):
|
for i in range(self._max_tmp_file_replace_attemps):
|
||||||
try:
|
try:
|
||||||
os.replace(local_filename, temp_filename)
|
os.replace(local_filename, temp_filename)
|
||||||
@ -1151,7 +1150,7 @@ class Artifacts(object):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
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
|
# exception could be thrown on some Windows systems
|
||||||
os.replace(local_filename, temp_filename)
|
os.replace(local_filename, temp_filename)
|
||||||
local_filename = temp_filename
|
local_filename = temp_filename
|
||||||
|
@ -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 fastapi import Request, Response # noqa
|
||||||
from .proxy import HttpProxy
|
from .proxy import HttpProxy
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ if TYPE_CHECKING:
|
|||||||
import pandas
|
import pandas
|
||||||
import numpy
|
import numpy
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from .router.router import HttpRouter
|
from .router.router import HttpRouter # noqa: F401
|
||||||
|
|
||||||
# Forward declaration to help linters
|
# Forward declaration to help linters
|
||||||
TaskInstance = TypeVar("TaskInstance", bound="Task")
|
TaskInstance = TypeVar("TaskInstance", bound="Task")
|
||||||
|
Loading…
Reference in New Issue
Block a user