Skip to content

Commit 2e66d3b

Browse files
committed
Add type hints necessary for the new disks fixtures
Signed-off-by: Yann Dirson <[email protected]>
1 parent d20b224 commit 2e66d3b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import itertools
24
import git
35
import logging
@@ -6,7 +8,7 @@
68
import tempfile
79

810
from packaging import version
9-
from typing import Dict
11+
from typing import Dict, Generator
1012

1113
import lib.config as global_config
1214

@@ -15,6 +17,7 @@
1517
from lib.common import wait_for, vm_image, is_uuid
1618
from lib.common import setup_formatted_and_mounted_disk, teardown_formatted_and_mounted_disk
1719
from lib.netutil import is_ipv6
20+
from lib.host import Host
1821
from lib.pool import Pool
1922
from lib.sr import SR
2023
from lib.vm import VM, vm_cache_key_from_def
@@ -149,7 +152,7 @@ def pytest_runtest_makereport(item, call):
149152
# fixtures
150153

151154
@pytest.fixture(scope='session')
152-
def hosts(pytestconfig):
155+
def hosts(pytestconfig) -> Generator[list[Host]]:
153156
nested_list = []
154157

155158
def setup_host(hostname_or_ip, *, config=None):

0 commit comments

Comments
 (0)