Skip to content

Commit

Permalink
fix pylint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu committed Feb 21, 2024
1 parent 7082c69 commit a171f24
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions agent/worker/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import supervisely_lib as sly
import hashlib
import re
from supervisely_lib.io.docker_utils import (
from supervisely_lib.io.docker_utils import ( # pylint: disable=import-error, no-name-in-module
PullPolicy,
) # pylint: disable=import-error, no-name-in-module
)


_SERVER_ADDRESS = "SERVER_ADDRESS"
Expand Down
20 changes: 10 additions & 10 deletions agent/worker/task_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@

import supervisely_lib as sly
from .task_dockerized import TaskDockerized
from supervisely_lib.io.json import (
from supervisely_lib.io.json import ( # pylint: disable=import-error, no-name-in-module
dump_json_file,
) # pylint: disable=import-error, no-name-in-module
from supervisely_lib.io.json import (
)
from supervisely_lib.io.json import ( # pylint: disable=import-error, no-name-in-module
flatten_json,
modify_keys,
) # pylint: disable=import-error, no-name-in-module
from supervisely_lib.api.api import (
)
from supervisely_lib.api.api import ( # pylint: disable=import-error, no-name-in-module
SUPERVISELY_TASK_ID,
) # pylint: disable=import-error, no-name-in-module
)
from supervisely_lib.api.api import Api # pylint: disable=import-error, no-name-in-module
from supervisely_lib.io.fs import ( # pylint: disable=import-error, no-name-in-module
ensure_base_path,
Expand All @@ -41,9 +41,9 @@
file_exists,
mkdir,
)
from supervisely_lib.io.exception_handlers import (
from supervisely_lib.io.exception_handlers import ( # pylint: disable=import-error, no-name-in-module
handle_exceptions,
) # pylint: disable=import-error, no-name-in-module
)

from worker import constants
from worker.agent_utils import (
Expand Down Expand Up @@ -612,8 +612,8 @@ def install_pip_requirements(self, container_id=None):

pip_install_exec_info = self._docker_api.api.exec_inspect(self._exec_id)

if pip_install_exec_info['ExitCode'] != 0:
raise RuntimeError("Pip install failed")
if pip_install_exec_info["ExitCode"] != 0:
raise RuntimeError("Pip install failed")

self.logger.info("Requirements are installed")

Expand Down
4 changes: 2 additions & 2 deletions agent/worker/task_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import os

from supervisely_lib.task.paths import TaskPaths # pylint: disable=import-error, no-name-in-module
from supervisely_lib.io.json import (
from supervisely_lib.io.json import ( # pylint: disable=import-error, no-name-in-module
dump_json_file,
) # pylint: disable=import-error, no-name-in-module
)

from worker.task_dockerized import TaskDockerized, TaskStep
from worker import constants
Expand Down
4 changes: 2 additions & 2 deletions agent/worker/task_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import supervisely_lib as sly
from supervisely_lib.task.paths import TaskPaths # pylint: disable=import-error, no-name-in-module
from supervisely_lib.io.json import (
from supervisely_lib.io.json import ( # pylint: disable=import-error, no-name-in-module
dump_json_file,
) # pylint: disable=import-error, no-name-in-module
)

from worker.task_dockerized import TaskDockerized, TaskStep
from worker import agent_utils
Expand Down
4 changes: 2 additions & 2 deletions agent/worker/task_inference_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import supervisely_lib as sly
from supervisely_lib.task.paths import TaskPaths # pylint: disable=import-error, no-name-in-module
from supervisely_lib.io.json import (
from supervisely_lib.io.json import ( # pylint: disable=import-error, no-name-in-module
dump_json_file,
) # pylint: disable=import-error, no-name-in-module
)

from worker.task_dockerized import TaskDockerized, TaskStep
from worker import constants
Expand Down
8 changes: 4 additions & 4 deletions agent/worker/task_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def init_additional(self):
def download_step(self):
self.logger.info("DOWNLOAD_DATA")

sly.io.json.dump_json_file(
sly.io.json.dump_json_file( # Deprecated 'task_settings.json' # pylint: disable=no-member
self.info["config"], self.config_path1
) # Deprecated 'task_settings.json' # pylint: disable=no-member
sly.io.json.dump_json_file(
)
sly.io.json.dump_json_file( # New style task_config.json # pylint: disable=no-member
self.info["config"], self.config_path2
) # New style task_config.json # pylint: disable=no-member
)

if len(self.info["projects"]) != 1:
raise ValueError(
Expand Down

0 comments on commit a171f24

Please sign in to comment.