Skip to content

Commit d1dad95

Browse files
committed
Add extra type annotations for ty
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
1 parent 145f866 commit d1dad95

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def pytest_runtest_makereport(
280280

281281
# store test results for each phase of a call, which can
282282
# be "setup", "call", "teardown"
283+
assert rep.when is not None
283284
item.stash.setdefault(PHASE_REPORT_KEY, {})[rep.when] = rep
284285

285286
return rep

data.py-dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ ISO_IMAGES: dict[str, "IsoImageDef"] = {
171171
# - 'default': keep using the pool's default SR
172172
# - 'local': use the first local SR found instead
173173
# - A UUID of the SR to be used
174-
DEFAULT_SR = 'default'
174+
DEFAULT_SR: str = 'default'
175175

176176
# Whether to cache VMs on the test host, that is import them only if not already
177177
# present in the target SR. This also causes the VM to be cloned at the beginning
@@ -182,7 +182,7 @@ DEFAULT_SR = 'default'
182182
# Example description: "[Cache for http://example.com/images/filename.xva]"
183183
# Delete the VM to remove it from cache.
184184
# This setting affects VMs managed by the `imported_vm` fixture.
185-
CACHE_IMPORTED_VM = False
185+
CACHE_IMPORTED_VM: bool = False
186186

187187
# Default LINSTOR redundancy configuration for creating SRs.
188188
LINSTOR_REDUNDANCY = 2

lib/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from lib.common import GiB
22

3-
ignore_ssh_banner = False
4-
ssh_output_max_lines = 20
5-
volume_size = 1 * GiB
6-
write_volume_cap = 2 * GiB
7-
write_volume_align = 1
3+
ignore_ssh_banner: bool = False
4+
ssh_output_max_lines: int = 20
5+
volume_size: int = 1 * GiB
6+
write_volume_cap: int = 2 * GiB
7+
write_volume_align: int = 1
88

99
def sr_device_config(datakey: str, *, required: list[str] = []) -> dict[str, str]:
1010
import data # import here to avoid depending on this user file for collecting tests

0 commit comments

Comments
 (0)