Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Nov 21, 2023
1 parent 33aa2f6 commit 05e1778
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/safeds_runner/server/module_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def _add_possible_packages_for_package_path(self, package_path: str) -> None:
self.allowed_packages.add(package_path)

Check warning on line 64 in src/safeds_runner/server/module_manager.py

View check run for this annotation

Codecov / codecov/patch

src/safeds_runner/server/module_manager.py#L62-L64

Added lines #L62 - L64 were not covered by tests

def find_spec(
self, fullname: str, path: typing.Sequence[str] | None = None, target: types.ModuleType | None = None,
self,
fullname: str,
path: typing.Sequence[str] | None = None,
target: types.ModuleType | None = None,
) -> ModuleSpec | None:
"""
Find a module which may be registered in the code dictionary.
Expand All @@ -77,7 +80,8 @@ def find_spec(
logging.debug("Find Spec: %s %s %s", fullname, path, target)
if fullname in self.allowed_packages:
parent_package = importlib.util.spec_from_loader(

Check warning on line 82 in src/safeds_runner/server/module_manager.py

View check run for this annotation

Codecov / codecov/patch

src/safeds_runner/server/module_manager.py#L80-L82

Added lines #L80 - L82 were not covered by tests
fullname, loader=InMemoryLoader(b"", fullname.replace(".", "/")),
fullname,
loader=InMemoryLoader(b"", fullname.replace(".", "/")),
)
if parent_package is None:
return None
Expand All @@ -101,7 +105,8 @@ def find_spec(
return importlib.util.spec_from_loader(

Check warning on line 105 in src/safeds_runner/server/module_manager.py

View check run for this annotation

Codecov / codecov/patch

src/safeds_runner/server/module_manager.py#L101-L105

Added lines #L101 - L105 were not covered by tests
fullname,
loader=InMemoryLoader(
self.code[parent_package_path][submodule_name].encode("utf-8"), fullname.replace(".", "/"),
self.code[parent_package_path][submodule_name].encode("utf-8"),
fullname.replace(".", "/"),
),
origin=parent_package_path,
)
Expand Down
14 changes: 12 additions & 2 deletions src/safeds_runner/server/pipeline_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ def get_backtrace_info(error: BaseException) -> list[dict[str, typing.Any]]:


def execute_pipeline(
code: dict[str, dict[str, str]], sdspackage: str, sdsmodule: str, sdspipeline: str, exec_id: str,
code: dict[str, dict[str, str]],
sdspackage: str,
sdsmodule: str,
sdspipeline: str,
exec_id: str,
) -> None:
"""
Run a Safe-DS pipeline.
Expand All @@ -167,7 +171,13 @@ def execute_pipeline(
if exec_id not in global_placeholder_map:
global_placeholder_map[exec_id] = multiprocessing_manager.dict()
process = PipelineProcess(
code, sdspackage, sdsmodule, sdspipeline, exec_id, global_messages_queue, global_placeholder_map[exec_id],
code,
sdspackage,
sdsmodule,
sdspipeline,
exec_id,
global_messages_queue,
global_placeholder_map[exec_id],
)
process.execute()

Expand Down

0 comments on commit 05e1778

Please sign in to comment.