reverting typehints

Signed-off-by: evanchia <evanchia@amazon.com>
This commit is contained in:
evanchia
2021-10-28 19:33:59 -07:00
parent 7c25cb6d5a
commit 4e2de0170c
3 changed files with 46 additions and 73 deletions
@@ -7,14 +7,13 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
Utility for specifying an Editor test, supports seamless parallelization and/or batching of tests. This is not a set of
tools to directly invoke, but a plugin with functions intended to be called by only the Pytest framework.
"""
from __future__ import annotations
import pytest
import inspect
__test__ = False
def pytest_addoption(parser):
# type (argparse.ArgumentParser) -> None
def pytest_addoption(parser: argparse.ArgumentParser) -> None:
"""
Options when running editor tests in batches or parallel.
:param parser: The ArgumentParser object
@@ -24,8 +23,7 @@ def pytest_addoption(parser):
parser.addoption("--no-editor-parallel", action="store_true", help="Don't run multiple editors in parallel")
parser.addoption("--editors-parallel", type=int, action="store", help="Override the number editors to run at the same time")
def pytest_pycollect_makeitem(collector, name, obj):
# type (PyCollector, str, object) -> Collector
def pytest_pycollect_makeitem(collector: PyCollector, name: str, obj: object) -> PyCollector:
"""
Create a custom custom item collection if the class defines pytest_custom_makeitem function. This is used for
automatically generating test functions with a custom collector.
@@ -40,8 +38,7 @@ def pytest_pycollect_makeitem(collector, name, obj):
return base.pytest_custom_makeitem(collector, name, obj)
@pytest.hookimpl(hookwrapper=True)
def pytest_collection_modifyitems(session, items, config):
# type (Session, List[EditorTestBase], Config) -> None
def pytest_collection_modifyitems(session: Session, items: list[EditorTestBase], config: Config) -> None:
"""
Add custom modification of items. This is used for adding the runners into the item list.
:param session: The Pytest Session