diff --git a/Makefile b/Makefile index 6c1c8e0bf..63d2ab1a9 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ flake8: # This runs the static type checking mypy: - @poetry run mypy --strict --namespace-packages . + @poetry run mypy --strict --namespace-packages --implicit-reexport . # Print current Python virtualenv venv: diff --git a/examples/testsuites/helloworld.py b/examples/testsuites/helloworld.py index 9e062845b..e63953f32 100644 --- a/examples/testsuites/helloworld.py +++ b/examples/testsuites/helloworld.py @@ -3,7 +3,7 @@ from typing import Any -from assertpy import assert_that # type: ignore +from assertpy import assert_that from lisa import Environment, Node, TestCaseMetadata, TestSuite, TestSuiteMetadata from lisa.operating_system import Posix diff --git a/examples/testsuites/multinodes.py b/examples/testsuites/multinodes.py index 5d91f4bb5..229ee5083 100644 --- a/examples/testsuites/multinodes.py +++ b/examples/testsuites/multinodes.py @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. -from assertpy import assert_that # type: ignore +from assertpy import assert_that from lisa import Environment, TestCaseMetadata, TestSuite, TestSuiteMetadata from lisa.testsuite import simple_requirement diff --git a/examples/testsuites/withscript.py b/examples/testsuites/withscript.py index 6013cdc54..877128ebc 100644 --- a/examples/testsuites/withscript.py +++ b/examples/testsuites/withscript.py @@ -4,7 +4,7 @@ from pathlib import Path from typing import Any -from assertpy import assert_that # type: ignore +from assertpy import assert_that from lisa import Node, TestCaseMetadata, TestSuite, TestSuiteMetadata from lisa.executable import CustomScript, CustomScriptBuilder diff --git a/lisa/environment.py b/lisa/environment.py index 2d5f25520..996aa913a 100644 --- a/lisa/environment.py +++ b/lisa/environment.py @@ -10,7 +10,7 @@ from enum import Enum from functools import partial from typing import TYPE_CHECKING, Any, Dict, List, Optional -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from marshmallow import validate from lisa import schema, search_space @@ -319,13 +319,13 @@ def load_environments( class EnvironmentHookSpec: - @hookspec # type: ignore + @hookspec def get_environment_information(self, environment: Environment) -> Dict[str, str]: ... class EnvironmentHookImpl: - @hookimpl # type: ignore + @hookimpl def get_environment_information(self, environment: Environment) -> Dict[str, str]: information: Dict[str, str] = {} information["name"] = environment.name diff --git a/lisa/main.py b/lisa/main.py index 091e0aea5..1937f2ecb 100644 --- a/lisa/main.py +++ b/lisa/main.py @@ -7,7 +7,7 @@ from datetime import datetime from logging import DEBUG, INFO from pathlib import Path -from retry import retry # type: ignore +from retry import retry from lisa.parameter_parser.argparser import parse_args from lisa.util import constants, get_datetime_path @@ -15,7 +15,7 @@ from lisa.util.logger import create_file_handler, get_logger, set_level from lisa.util.perf_timer import create_timer -@retry(FileExistsError, tries=10, delay=0) # type: ignore +@retry(FileExistsError, tries=10, delay=0) def create_run_path(root_path: Path) -> Path: current_time = datetime.utcnow() date = current_time.strftime("%Y%m%d") diff --git a/lisa/notifiers/console.py b/lisa/notifiers/console.py index 918403102..7ad2e6900 100644 --- a/lisa/notifiers/console.py +++ b/lisa/notifiers/console.py @@ -5,7 +5,7 @@ import logging from dataclasses import dataclass from typing import Any, List, Type, cast -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from lisa import notifier, schema from lisa.testsuite import TestResultMessage diff --git a/lisa/notifiers/html.py b/lisa/notifiers/html.py index dfceb0bc6..f0c21fd0c 100644 --- a/lisa/notifiers/html.py +++ b/lisa/notifiers/html.py @@ -8,7 +8,7 @@ from typing import Any, List, Type, cast import pytest from _pytest.config import Config from _pytest.reports import CollectReport, TestReport -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from pytest_html.plugin import HTMLReport # type: ignore from lisa import schema diff --git a/lisa/platform_.py b/lisa/platform_.py index a88d27729..25f9110ad 100644 --- a/lisa/platform_.py +++ b/lisa/platform_.py @@ -77,7 +77,7 @@ class Platform(subclasses.BaseClassWithRunbookMixin, InitializableMixin): def _get_environment_information(self, environment: Environment) -> Dict[str, str]: return {} - @hookimpl # type: ignore + @hookimpl def get_environment_information(self, environment: Environment) -> Dict[str, str]: information: Dict[str, str] = {} diff --git a/lisa/runners/legacy_runner.py b/lisa/runners/legacy_runner.py index 690f56d2a..98d808270 100644 --- a/lisa/runners/legacy_runner.py +++ b/lisa/runners/legacy_runner.py @@ -9,9 +9,9 @@ import re import time from functools import partial from pathlib import Path -from typing import Any, Dict, Iterable, List, Pattern +from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Pattern -from retry import retry # type: ignore +from retry import retry from lisa import schema from lisa.node import Node @@ -561,7 +561,7 @@ class LogParser(InitializableMixin): cases.append(current_case) return cases - @retry(tries=10, jitter=1) # type: ignore + @retry(tries=10, jitter=1) def _read_log(self) -> str: """ V2 opens log file frequently to write content, copying may be failed due to @@ -584,12 +584,15 @@ class LogParser(InitializableMixin): # detach the handle detached_handle = handle.Detach() + content = "" # get a file descriptor associated to the handle - file_descriptor = msvcrt.open_osfhandle(detached_handle, os.O_RDONLY) + if not TYPE_CHECKING: # FIXME: if you have a better solution + # for mypy checks on Linux, change this + file_descriptor = msvcrt.open_osfhandle(detached_handle, os.O_RDONLY) - # open the file descriptor - with open(file_descriptor) as file: - content = file.read() + # open the file descriptor + with open(file_descriptor) as file: + content = file.read() return content def _line_iter(self) -> Iterable[str]: diff --git a/lisa/runners/tests/test_legacy_runner.py b/lisa/runners/tests/test_legacy_runner.py index 7766e862f..753899c52 100644 --- a/lisa/runners/tests/test_legacy_runner.py +++ b/lisa/runners/tests/test_legacy_runner.py @@ -5,7 +5,7 @@ from dataclasses import dataclass from typing import Dict, List from unittest import TestCase -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from lisa import schema from lisa.runners import legacy_runner diff --git a/lisa/schema.py b/lisa/schema.py index b5e5d4077..d1f639351 100644 --- a/lisa/schema.py +++ b/lisa/schema.py @@ -6,7 +6,7 @@ from dataclasses import dataclass, field from enum import Enum from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, cast -from dataclasses_json import ( # type: ignore +from dataclasses_json import ( CatchAll, DataClassJsonMixin, Undefined, @@ -47,7 +47,7 @@ def metadata( # keep data_key for underlying marshmallow field_name = kwargs.get("data_key") return config( - field_name=field_name, + field_name=cast(str, field_name), encoder=encoder, decoder=decoder, mm_field=field_function(*args, **kwargs), @@ -110,7 +110,7 @@ class ListableValidator(validate.Validator): @dataclass_json(undefined=Undefined.INCLUDE) @dataclass class ExtendableSchemaMixin: - extended_schemas: CatchAll = field(default_factory=dict) + extended_schemas: CatchAll = field(default_factory=dict) # type: ignore def get_extended_runbook(self, runbook_type: Type[T], type_name: str = "") -> T: """ @@ -329,7 +329,7 @@ class Notifier(TypedSchema): detail types are defined in notifier itself, allowed items are handled in code. """ - delay_parsed: CatchAll = field(default_factory=dict) + delay_parsed: CatchAll = field(default_factory=dict) # type: ignore @dataclass_json(undefined=Undefined.INCLUDE) diff --git a/lisa/search_space.py b/lisa/search_space.py index 1bcf389d5..31e79c942 100644 --- a/lisa/search_space.py +++ b/lisa/search_space.py @@ -6,7 +6,7 @@ from abc import abstractmethod from dataclasses import dataclass, field from typing import Any, Iterable, List, Optional, Set, TypeVar, Union -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from lisa.util import LisaException diff --git a/lisa/sut_orchestrator/azure/common.py b/lisa/sut_orchestrator/azure/common.py index 09b449058..2d9d80e8c 100644 --- a/lisa/sut_orchestrator/azure/common.py +++ b/lisa/sut_orchestrator/azure/common.py @@ -9,7 +9,7 @@ from azure.mgmt.compute import ComputeManagementClient # type: ignore from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements # type: ignore from azure.mgmt.network import NetworkManagementClient # type: ignore from azure.mgmt.storage import StorageManagementClient # type: ignore -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from lisa import schema from lisa.environment import Environment diff --git a/lisa/sut_orchestrator/azure/hooks.py b/lisa/sut_orchestrator/azure/hooks.py index 15a506346..f2faec6b6 100644 --- a/lisa/sut_orchestrator/azure/hooks.py +++ b/lisa/sut_orchestrator/azure/hooks.py @@ -5,7 +5,7 @@ from lisa.util import SkippedException, hookimpl, hookspec, plugin_manager class AzureHookSpec: - @hookspec # type: ignore + @hookspec def azure_deploy_failed(self, error_message: str) -> None: """ It can be used to skipped some by design failed deployment, such as deploy gen1 @@ -26,7 +26,7 @@ class AzureHookSpecDefaultImpl: ) ] - @hookimpl # type: ignore + @hookimpl def azure_deploy_failed(self, error_message: str) -> None: for message, pattern, exception_type in self.__error_maps: if pattern.findall(error_message): diff --git a/lisa/sut_orchestrator/azure/platform_.py b/lisa/sut_orchestrator/azure/platform_.py index acae8f75c..ffe40cf4a 100644 --- a/lisa/sut_orchestrator/azure/platform_.py +++ b/lisa/sut_orchestrator/azure/platform_.py @@ -33,9 +33,9 @@ from azure.mgmt.resource.resources.models import ( # type: ignore DeploymentProperties, ) from azure.mgmt.storage.models import Sku, StorageAccountCreateParameters # type:ignore -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from marshmallow import fields, validate -from retry import retry # type: ignore +from retry import retry from lisa import schema, search_space from lisa.environment import Environment @@ -605,7 +605,7 @@ class AzurePlatform(Platform): template = json.load(f) return template - @retry(tries=2) # type: ignore + @retry(tries=2) def _load_location_info_from_file( self, cached_file_name: Path, log: Logger ) -> Optional[AzureLocation]: @@ -910,7 +910,7 @@ class AzurePlatform(Platform): return errors # the VM may not be queried after deployed. use retry to mitigate it. - @retry(exceptions=LisaException, tries=150, delay=2) # type: ignore + @retry(exceptions=LisaException, tries=150, delay=2) def _load_vms( self, environment: Environment, log: Logger ) -> Dict[str, VirtualMachine]: @@ -934,7 +934,7 @@ class AzurePlatform(Platform): ) return vms_map - @retry(exceptions=LisaException, tries=150, delay=2) # type: ignore + @retry(exceptions=LisaException, tries=150, delay=2) def _load_nics( self, environment: Environment, log: Logger ) -> Dict[str, NetworkInterface]: @@ -964,7 +964,7 @@ class AzurePlatform(Platform): ) return nics_map - @retry(exceptions=LisaException, tries=150, delay=2) # type: ignore + @retry(exceptions=LisaException, tries=150, delay=2) def _load_public_ips( self, environment: Environment, log: Logger ) -> Dict[str, PublicIPAddress]: diff --git a/lisa/tests/test_platform.py b/lisa/tests/test_platform.py index 432a79b0c..827707260 100644 --- a/lisa/tests/test_platform.py +++ b/lisa/tests/test_platform.py @@ -5,7 +5,7 @@ from dataclasses import dataclass, field from typing import Any, List, Optional, Type, Union from unittest.case import TestCase -from dataclasses_json import dataclass_json # type: ignore +from dataclasses_json import dataclass_json from lisa import schema from lisa.environment import ( diff --git a/lisa/testsuite.py b/lisa/testsuite.py index 738684b52..5b4dc1bdf 100644 --- a/lisa/testsuite.py +++ b/lisa/testsuite.py @@ -19,7 +19,7 @@ from typing import ( Union, ) -from retry.api import retry_call # type: ignore +from retry.api import retry_call from lisa import notifier, schema, search_space from lisa.environment import EnvironmentSpace, EnvironmentStatus diff --git a/lisa/tools/lscpu.py b/lisa/tools/lscpu.py index b1ee7b318..668eb39c7 100644 --- a/lisa/tools/lscpu.py +++ b/lisa/tools/lscpu.py @@ -4,7 +4,7 @@ import re from typing import Any, Optional, Type -from assertpy import assert_that # type: ignore +from assertpy import assert_that from lisa.executable import Tool diff --git a/lisa/util/__init__.py b/lisa/util/__init__.py index 8c8b272f9..b42658621 100644 --- a/lisa/util/__init__.py +++ b/lisa/util/__init__.py @@ -7,7 +7,7 @@ from datetime import datetime from pathlib import Path from typing import Any, Callable, Dict, Iterable, List, Optional, Pattern, Type, TypeVar -import pluggy # type: ignore +import pluggy T = TypeVar("T") diff --git a/lisa/util/shell.py b/lisa/util/shell.py index 379103577..0b52cc672 100644 --- a/lisa/util/shell.py +++ b/lisa/util/shell.py @@ -11,12 +11,12 @@ from pathlib import Path, PurePath from time import sleep from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple, Union, cast -import paramiko # type: ignore +import paramiko import spur # type: ignore import spurplus # type: ignore from func_timeout import FunctionTimedOut, func_set_timeout # type: ignore -from paramiko.ssh_exception import SSHException # type: ignore -from retry import retry # type: ignore +from paramiko.ssh_exception import SSHException +from retry import retry from lisa.util import InitializableMixin, LisaException @@ -131,7 +131,7 @@ class WindowsShellType(object): # retry strategy is the same as spurplus.connect_with_retries. -@retry(Exception, tries=3, delay=1, logger=None) # type: ignore +@retry(Exception, tries=3, delay=1, logger=None) def try_connect(connection_info: ConnectionInfo) -> Any: # spur always run a posix command and will fail on Windows. # So try with paramiko firstly. @@ -313,13 +313,25 @@ class SshShell(InitializableMixin): path_str = self._purepath_to_str(path) sftp_attributes: paramiko.SFTPAttributes = self._inner_shell.stat(path_str) - result = os.stat_result(sftp_attributes.st_mode) - result.st_mode = sftp_attributes.st_mode - result.st_size = sftp_attributes.st_size - result.st_uid = sftp_attributes.st_uid - result.st_gid = sftp_attributes.st_gid - result.st_atime = sftp_attributes.st_atime - result.st_mtime = sftp_attributes.st_mtime + result = os.stat_result(()) + result.st_atime = ( + sftp_attributes.st_atime if sftp_attributes.st_atime is not None else 0 + ) + result.st_gid = ( + sftp_attributes.st_gid if sftp_attributes.st_gid is not None else 0 + ) + result.st_mode = ( + sftp_attributes.st_mode if sftp_attributes.st_mode is not None else 0 + ) + result.st_mtime = ( + sftp_attributes.st_mtime if sftp_attributes.st_mtime is not None else 0 + ) + result.st_size = ( + sftp_attributes.st_size if sftp_attributes.st_size is not None else 0 + ) + result.st_uid = ( + sftp_attributes.st_uid if sftp_attributes.st_uid is not None else 0 + ) return result def is_dir(self, path: PurePath) -> bool: diff --git a/poetry.lock b/poetry.lock index c5dc32577..bb30d0600 100644 --- a/poetry.lock +++ b/poetry.lock @@ -255,7 +255,7 @@ toml = ["toml"] [[package]] name = "cryptography" -version = "3.4.6" +version = "3.4.7" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -510,7 +510,7 @@ async = ["aiohttp (>=3.0)", "aiodns"] [[package]] name = "mypy" -version = "0.782" +version = "0.812" description = "Optional static typing for Python" category = "dev" optional = false @@ -1069,7 +1069,7 @@ brotli = ["brotlipy (>=0.6.0)"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "bed7c549e2967df901398e5dad3377eb42c46e891412c68ccc75e070d4a22a20" +content-hash = "b3264782785d1c41d9bbe1b82d34c745437f537fb43ab77770e1455cb7c7a2f1" [metadata.files] appdirs = [ @@ -1249,18 +1249,17 @@ coverage = [ {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, ] cryptography = [ - {file = "cryptography-3.4.6-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:57ad77d32917bc55299b16d3b996ffa42a1c73c6cfa829b14043c561288d2799"}, - {file = "cryptography-3.4.6-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:4169a27b818de4a1860720108b55a2801f32b6ae79e7f99c00d79f2a2822eeb7"}, - {file = "cryptography-3.4.6-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:93cfe5b7ff006de13e1e89830810ecbd014791b042cbe5eec253be11ac2b28f3"}, - {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:5ecf2bcb34d17415e89b546dbb44e73080f747e504273e4d4987630493cded1b"}, - {file = "cryptography-3.4.6-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:fec7fb46b10da10d9e1d078d1ff8ed9e05ae14f431fdbd11145edd0550b9a964"}, - {file = "cryptography-3.4.6-cp36-abi3-win32.whl", hash = "sha256:df186fcbf86dc1ce56305becb8434e4b6b7504bc724b71ad7a3239e0c9d14ef2"}, - {file = "cryptography-3.4.6-cp36-abi3-win_amd64.whl", hash = "sha256:66b57a9ca4b3221d51b237094b0303843b914b7d5afd4349970bb26518e350b0"}, - {file = "cryptography-3.4.6-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:066bc53f052dfeda2f2d7c195cf16fb3e5ff13e1b6b7415b468514b40b381a5b"}, - {file = "cryptography-3.4.6-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:600cf9bfe75e96d965509a4c0b2b183f74a4fa6f5331dcb40fb7b77b7c2484df"}, - {file = "cryptography-3.4.6-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:0923ba600d00718d63a3976f23cab19aef10c1765038945628cd9be047ad0336"}, - {file = "cryptography-3.4.6-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:9e98b452132963678e3ac6c73f7010fe53adf72209a32854d55690acac3f6724"}, - {file = "cryptography-3.4.6.tar.gz", hash = "sha256:2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87"}, + {file = "cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959"}, + {file = "cryptography-3.4.7-cp36-abi3-win32.whl", hash = "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d"}, + {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, + {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, + {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, + {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] dataclasses-json = [ {file = "dataclasses-json-0.5.2.tar.gz", hash = "sha256:56ec931959ede74b5dedf65cf20772e6a79764d20c404794cce0111c88c085ff"}, @@ -1336,20 +1335,28 @@ msrest = [ {file = "msrest-0.6.21.tar.gz", hash = "sha256:72661bc7bedc2dc2040e8f170b6e9ef226ee6d3892e01affd4d26b06474d68d8"}, ] mypy = [ - {file = "mypy-0.782-cp35-cp35m-macosx_10_6_x86_64.whl", hash = "sha256:2c6cde8aa3426c1682d35190b59b71f661237d74b053822ea3d748e2c9578a7c"}, - {file = "mypy-0.782-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9c7a9a7ceb2871ba4bac1cf7217a7dd9ccd44c27c2950edbc6dc08530f32ad4e"}, - {file = "mypy-0.782-cp35-cp35m-win_amd64.whl", hash = "sha256:c05b9e4fb1d8a41d41dec8786c94f3b95d3c5f528298d769eb8e73d293abc48d"}, - {file = "mypy-0.782-cp36-cp36m-macosx_10_6_x86_64.whl", hash = "sha256:6731603dfe0ce4352c555c6284c6db0dc935b685e9ce2e4cf220abe1e14386fd"}, - {file = "mypy-0.782-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:f05644db6779387ccdb468cc47a44b4356fc2ffa9287135d05b70a98dc83b89a"}, - {file = "mypy-0.782-cp36-cp36m-win_amd64.whl", hash = "sha256:b7fbfabdbcc78c4f6fc4712544b9b0d6bf171069c6e0e3cb82440dd10ced3406"}, - {file = "mypy-0.782-cp37-cp37m-macosx_10_6_x86_64.whl", hash = "sha256:3fdda71c067d3ddfb21da4b80e2686b71e9e5c72cca65fa216d207a358827f86"}, - {file = "mypy-0.782-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d7df6eddb6054d21ca4d3c6249cae5578cb4602951fd2b6ee2f5510ffb098707"}, - {file = "mypy-0.782-cp37-cp37m-win_amd64.whl", hash = "sha256:a4a2cbcfc4cbf45cd126f531dedda8485671545b43107ded25ce952aac6fb308"}, - {file = "mypy-0.782-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6bb93479caa6619d21d6e7160c552c1193f6952f0668cdda2f851156e85186fc"}, - {file = "mypy-0.782-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:81c7908b94239c4010e16642c9102bfc958ab14e36048fa77d0be3289dda76ea"}, - {file = "mypy-0.782-cp38-cp38-win_amd64.whl", hash = "sha256:5dd13ff1f2a97f94540fd37a49e5d255950ebcdf446fb597463a40d0df3fac8b"}, - {file = "mypy-0.782-py3-none-any.whl", hash = "sha256:e0b61738ab504e656d1fe4ff0c0601387a5489ca122d55390ade31f9ca0e252d"}, - {file = "mypy-0.782.tar.gz", hash = "sha256:eff7d4a85e9eea55afa34888dfeaccde99e7520b51f867ac28a48492c0b1130c"}, + {file = "mypy-0.812-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a26f8ec704e5a7423c8824d425086705e381b4f1dfdef6e3a1edab7ba174ec49"}, + {file = "mypy-0.812-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:28fb5479c494b1bab244620685e2eb3c3f988d71fd5d64cc753195e8ed53df7c"}, + {file = "mypy-0.812-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:9743c91088d396c1a5a3c9978354b61b0382b4e3c440ce83cf77994a43e8c521"}, + {file = "mypy-0.812-cp35-cp35m-win_amd64.whl", hash = "sha256:d7da2e1d5f558c37d6e8c1246f1aec1e7349e4913d8fb3cb289a35de573fe2eb"}, + {file = "mypy-0.812-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4eec37370483331d13514c3f55f446fc5248d6373e7029a29ecb7b7494851e7a"}, + {file = "mypy-0.812-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d65cc1df038ef55a99e617431f0553cd77763869eebdf9042403e16089fe746c"}, + {file = "mypy-0.812-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:61a3d5b97955422964be6b3baf05ff2ce7f26f52c85dd88db11d5e03e146a3a6"}, + {file = "mypy-0.812-cp36-cp36m-win_amd64.whl", hash = "sha256:25adde9b862f8f9aac9d2d11971f226bd4c8fbaa89fb76bdadb267ef22d10064"}, + {file = "mypy-0.812-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:552a815579aa1e995f39fd05dde6cd378e191b063f031f2acfe73ce9fb7f9e56"}, + {file = "mypy-0.812-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:499c798053cdebcaa916eef8cd733e5584b5909f789de856b482cd7d069bdad8"}, + {file = "mypy-0.812-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:5873888fff1c7cf5b71efbe80e0e73153fe9212fafdf8e44adfe4c20ec9f82d7"}, + {file = "mypy-0.812-cp37-cp37m-win_amd64.whl", hash = "sha256:9f94aac67a2045ec719ffe6111df543bac7874cee01f41928f6969756e030564"}, + {file = "mypy-0.812-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d23e0ea196702d918b60c8288561e722bf437d82cb7ef2edcd98cfa38905d506"}, + {file = "mypy-0.812-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:674e822aa665b9fd75130c6c5f5ed9564a38c6cea6a6432ce47eafb68ee578c5"}, + {file = "mypy-0.812-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:abf7e0c3cf117c44d9285cc6128856106183938c68fd4944763003decdcfeb66"}, + {file = "mypy-0.812-cp38-cp38-win_amd64.whl", hash = "sha256:0d0a87c0e7e3a9becdfbe936c981d32e5ee0ccda3e0f07e1ef2c3d1a817cf73e"}, + {file = "mypy-0.812-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7ce3175801d0ae5fdfa79b4f0cfed08807af4d075b402b7e294e6aa72af9aa2a"}, + {file = "mypy-0.812-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:b09669bcda124e83708f34a94606e01b614fa71931d356c1f1a5297ba11f110a"}, + {file = "mypy-0.812-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:33f159443db0829d16f0a8d83d94df3109bb6dd801975fe86bacb9bf71628e97"}, + {file = "mypy-0.812-cp39-cp39-win_amd64.whl", hash = "sha256:3f2aca7f68580dc2508289c729bd49ee929a436208d2b2b6aab15745a70a57df"}, + {file = "mypy-0.812-py3-none-any.whl", hash = "sha256:2f9b3407c58347a452fc0736861593e105139b905cca7d097e413453a1d650b4"}, + {file = "mypy-0.812.tar.gz", hash = "sha256:cd07039aa5df222037005b08fbbfd69b3ab0b0bd7a07d7906de75ae52c4e3119"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -1435,6 +1442,8 @@ pynacl = [ {file = "PyNaCl-1.4.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:7757ae33dae81c300487591c68790dfb5145c7d03324000433d9a2c141f82af7"}, {file = "PyNaCl-1.4.0-cp35-abi3-macosx_10_10_x86_64.whl", hash = "sha256:757250ddb3bff1eecd7e41e65f7f833a8405fede0194319f87899690624f2122"}, {file = "PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:30f9b96db44e09b3304f9ea95079b1b7316b2b4f3744fe3aaecccd95d547063d"}, + {file = "PyNaCl-1.4.0-cp35-abi3-win32.whl", hash = "sha256:4e10569f8cbed81cb7526ae137049759d2a8d57726d52c1a000a3ce366779634"}, + {file = "PyNaCl-1.4.0-cp35-abi3-win_amd64.whl", hash = "sha256:c914f78da4953b33d4685e3cdc7ce63401247a21425c16a39760e282075ac4a6"}, {file = "PyNaCl-1.4.0-cp35-cp35m-win32.whl", hash = "sha256:06cbb4d9b2c4bd3c8dc0d267416aaed79906e7b33f114ddbf0911969794b1cc4"}, {file = "PyNaCl-1.4.0-cp35-cp35m-win_amd64.whl", hash = "sha256:511d269ee845037b95c9781aa702f90ccc36036f95d0f31373a6a79bd8242e25"}, {file = "PyNaCl-1.4.0-cp36-cp36m-win32.whl", hash = "sha256:11335f09060af52c97137d4ac54285bcb7df0cef29014a1a4efe64ac065434c4"}, @@ -1496,18 +1505,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, diff --git a/pyproject.toml b/pyproject.toml index ad4b3b838..8cdf86a30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,40 +6,40 @@ authors = ["contributors license = "MIT" [tool.poetry.dependencies] -python = "^3.8" +PyGObject = {version = "^3.38.0", platform = 'linux'} PyYAML = "^5.4.1" -retry = "^0.9.2" -paramiko = "^2.7.2" -spurplus = "^2.3.4" -dataclasses-json = "^0.5.2" +assertpy = "^1.1" azure-identity = "^1.5.0" -azure-mgmt-resource = "^16.0.0" azure-mgmt-compute = "^19.0.0" azure-mgmt-marketplaceordering = "^1.1.0" azure-mgmt-network = "^18.0.0" +azure-mgmt-resource = "^16.0.0" azure-mgmt-storage = "^17.0.0" +dataclasses-json = "^0.5.2" func-timeout = "^4.3.5" -assertpy = "^1.1" -pytest-html = "^3.1.1" +paramiko = "^2.7.2" pluggy = "^0.13.1" pypiwin32 = {version = "^223", platform = "win32"} -PyGObject = {version = "^3.38.0", platform = 'linux'} +pytest-html = "^3.1.1" +python = "^3.8" python-dateutil = "^2.8.1" +retry = "^0.9.2" +spurplus = "^2.3.4" [tool.poetry.dev-dependencies] black = "^20.8b1" +coverage = "^5.3" flake8 = "^3.8.3" flake8-black = "^0.2.1" flake8-bugbear = "^21.3.2" flake8-isort = "^4.0.0" isort = "^5.5.3" -mypy = "^0.782" +mypy = "^0.812" pyls-black = "^0.4.6" pyls-isort = "^0.2.0" pyls-mypy = "^0.1.8" python-language-server = "^0.36.2" rope = "^0.18.0" -coverage = "^5.3" [tool.black] line-length = 88 diff --git a/testsuites/basic/lsvmbus.py b/testsuites/basic/lsvmbus.py index 39cdcb840..891f1218f 100644 --- a/testsuites/basic/lsvmbus.py +++ b/testsuites/basic/lsvmbus.py @@ -1,6 +1,6 @@ import math -from assertpy import assert_that # type: ignore +from assertpy import assert_that from lisa import Environment, Node, TestCaseMetadata, TestSuite, TestSuiteMetadata from lisa.operating_system import Windows