diff options
author | Devaev Maxim <[email protected]> | 2021-06-08 22:22:28 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2021-06-08 22:22:28 +0300 |
commit | 240f3e095b063d3fdebb512c87c493b81c0dd9e3 (patch) | |
tree | dd2bec36a9aa5852f8209db08717f58738b06e45 | |
parent | 2724a14eab26030fc0f2c830b12aa613a3b8e8a8 (diff) |
lint fix
-rw-r--r-- | kvmd/aiotools.py | 2 | ||||
-rw-r--r-- | kvmd/yamlconf/loader.py | 4 | ||||
-rw-r--r-- | testenv/requirements.txt | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/kvmd/aiotools.py b/kvmd/aiotools.py index f93669f9..7f5914f2 100644 --- a/kvmd/aiotools.py +++ b/kvmd/aiotools.py @@ -85,7 +85,7 @@ async def wait_infinite() -> None: await asyncio.get_event_loop().create_future() -async def wait_first(*aws: Awaitable) -> Tuple[Set[asyncio.Future], Set[asyncio.Future]]: +async def wait_first(*aws: Awaitable) -> Tuple[Set[asyncio.Task], Set[asyncio.Task]]: return (await asyncio.wait(list(aws), return_when=asyncio.FIRST_COMPLETED)) diff --git a/kvmd/yamlconf/loader.py b/kvmd/yamlconf/loader.py index 2acff93f..5050c2e3 100644 --- a/kvmd/yamlconf/loader.py +++ b/kvmd/yamlconf/loader.py @@ -46,8 +46,8 @@ class _YamlLoader(yaml.SafeLoader): super().__init__(yaml_file) self.__root = os.path.dirname(yaml_file.name) - def include(self, node: yaml.nodes.Node) -> Any: - path = os.path.join(self.__root, self.construct_scalar(node)) + def include(self, node: yaml.nodes.ScalarNode) -> Any: + path = os.path.join(self.__root, str(self.construct_scalar(node))) return load_yaml_file(path) diff --git a/testenv/requirements.txt b/testenv/requirements.txt index b157fea5..3d5e89d9 100644 --- a/testenv/requirements.txt +++ b/testenv/requirements.txt @@ -1,2 +1,4 @@ pyghmi spidev +types-PyYAML +types-aiofiles |