From cb66f9da600db6f5f7f5a8fd9fecea160b7cd011 Mon Sep 17 00:00:00 2001 From: Xyphuz Date: Wed, 8 Jun 2022 20:57:28 +0800 Subject: [PATCH] chore: apply pre-commit hooks --- compose_viz/models/device.py | 8 +++++--- compose_viz/models/service.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compose_viz/models/device.py b/compose_viz/models/device.py index e777a3d..80d6b1e 100644 --- a/compose_viz/models/device.py +++ b/compose_viz/models/device.py @@ -1,6 +1,8 @@ +from typing import Optional + class Device: - def __init__(self, host_path: str, container_path: str, cgroup_permissions: str = None): + def __init__(self, host_path: str, container_path: str, cgroup_permissions: Optional[str] = None): self._host_path = host_path self._container_path = container_path self._cgroup_permissions = cgroup_permissions @@ -12,7 +14,7 @@ class Device: @property def container_path(self): return self._container_path - + @property def cgroup_permissions(self): - return self._cgroup_permissions \ No newline at end of file + return self._cgroup_permissions diff --git a/compose_viz/models/service.py b/compose_viz/models/service.py index eed285c..8e578c2 100644 --- a/compose_viz/models/service.py +++ b/compose_viz/models/service.py @@ -19,7 +19,7 @@ class Service: extends: Optional[Extends] = None, cgroup_parent: Optional[str] = None, container_name: Optional[str] = None, - devices: Optional[Device] = [], + devices: List[Device] = [], env_file: List[str] = [], expose: List[str] = [], profiles: List[str] = [],