Skip to content

Commit 38e89db

Browse files
committed
Disallow quoted type annotations
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
1 parent 85e0434 commit 38e89db

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

lib/host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def host_data(hostname_or_ip: str) -> dict[str, str]:
5252

5353
class Host:
5454
xe_prefix = "host"
55-
pool: "Pool"
55+
pool: Pool
5656

5757
# Data extraction is automatic, no conversion from str is done.
5858
BlockDeviceInfo = TypedDict('BlockDeviceInfo', {"name": str,

lib/vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def create_cd_vbd(self, device: str, userdevice: str) -> VBD:
657657
logging.info("New VBD %s", vbd_uuid)
658658
return vbd
659659

660-
def clone(self, *, name: str | None = None) -> "VM":
660+
def clone(self, *, name: str | None = None) -> VM:
661661
if name is None:
662662
name = self.name() + '_clone_for_tests'
663663
logging.info("Clone VM")

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ select = [
5858
"SLF", # flake8-self
5959
"SIM", # flake8-simplify
6060
"ANN", # flake8-annotations
61+
"UP037", # quoted-annotation
62+
"FA", # future-annotations
6163
]
6264
# don't use some of the default D and SIM rules
6365
ignore = [

0 commit comments

Comments
 (0)