diff --git a/addon/flamenco/bat/shaman.py b/addon/flamenco/bat/shaman.py index 34e27fc2..f80301b1 100644 --- a/addon/flamenco/bat/shaman.py +++ b/addon/flamenco/bat/shaman.py @@ -506,6 +506,7 @@ def _root_path() -> PurePath: return PureWindowsPath("X:/") return PurePosixPath("/") + def _root_path_strip(path: PurePath) -> PurePosixPath: """Strip off the leading / (POSIX) and drive letter (Windows). diff --git a/addon/flamenco/bat/submodules.py b/addon/flamenco/bat/submodules.py index 399cdb26..f9e718bb 100644 --- a/addon/flamenco/bat/submodules.py +++ b/addon/flamenco/bat/submodules.py @@ -3,5 +3,6 @@ from .. import wheels # Load all the submodules we need from BAT in one go. _bat_modules = wheels.load_wheel( "blender_asset_tracer", - ("blendfile", "pack", "pack.progress", "pack.transfer", "pack.shaman", "bpathlib")) + ("blendfile", "pack", "pack.progress", "pack.transfer", "pack.shaman", "bpathlib"), +) bat_toplevel, blendfile, pack, progress, transfer, shaman, bpathlib = _bat_modules diff --git a/addon/flamenco/comms.py b/addon/flamenco/comms.py index 78bdc7f3..4c303391 100644 --- a/addon/flamenco/comms.py +++ b/addon/flamenco/comms.py @@ -128,7 +128,8 @@ def ping_manager( try: version: FlamencoVersion = meta_api.get_version() storage: SharedStorageLocation = meta_api.get_shared_storage( - "users", platform.system().lower()) + "users", platform.system().lower() + ) except ApiException as ex: error = "Manager cannot be reached: %s" % ex except MaxRetryError as ex: diff --git a/addon/flamenco/job_submission.py b/addon/flamenco/job_submission.py index dcb9ac4b..e1a6185b 100644 --- a/addon/flamenco/job_submission.py +++ b/addon/flamenco/job_submission.py @@ -30,6 +30,7 @@ BLENDFILE_SETTING_KEY = "blendfile" log = logging.getLogger(__name__) + def job_for_scene(scene: bpy.types.Scene) -> Optional[_SubmittedJob]: from flamenco.manager.models import SubmittedJob, JobMetadata diff --git a/addon/flamenco/operators.py b/addon/flamenco/operators.py index acff3730..c559c6cc 100644 --- a/addon/flamenco/operators.py +++ b/addon/flamenco/operators.py @@ -596,5 +596,5 @@ def parse_api_error(api_client: _ApiClient, ex: _ApiException) -> _Error: response = MockResponse() response.data = ex.body - error: _Error = api_client.deserialize(response, (Error, ), True) + error: _Error = api_client.deserialize(response, (Error,), True) return error diff --git a/addon/flamenco/wheels/__init__.py b/addon/flamenco/wheels/__init__.py index 76791ad1..45f5d30c 100644 --- a/addon/flamenco/wheels/__init__.py +++ b/addon/flamenco/wheels/__init__.py @@ -13,6 +13,7 @@ from typing import Iterator, Iterable _my_dir = Path(__file__).parent _log = logging.getLogger(__name__) + def load_wheel(module_name: str, submodules: Iterable[str]) -> list[ModuleType]: """Loads modules from a wheel file 'module_name*.whl'. @@ -46,8 +47,9 @@ def load_wheel(module_name: str, submodules: Iterable[str]) -> list[ModuleType]: loaded_modules.append(module) _log.info("Loaded %s from %s", modname, module.__file__) - assert len(loaded_modules) == len(to_load), \ - f"expecting to load {len(to_load)} modules, but only have {len(loaded_modules)}: {loaded_modules}" + assert len(loaded_modules) == len( + to_load + ), f"expecting to load {len(to_load)} modules, but only have {len(loaded_modules)}: {loaded_modules}" return loaded_modules