From f9d2d3100e2893408ccc52504072ba736a4ef52b Mon Sep 17 00:00:00 2001 From: Carlos Nihelton Date: Tue, 10 May 2022 09:31:22 -0300 Subject: [PATCH] Fix set type hint for older Python versions --- subiquity/server/controllers/identity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subiquity/server/controllers/identity.py b/subiquity/server/controllers/identity.py index e134d506..d08eec8d 100644 --- a/subiquity/server/controllers/identity.py +++ b/subiquity/server/controllers/identity.py @@ -19,6 +19,7 @@ import attr import pwd import os import re +from typing import Set from subiquitycore.context import with_context @@ -33,7 +34,7 @@ USERNAME_MAXLEN = 32 USERNAME_REGEX = r'[a-z_][a-z0-9_-]*' -def _reserved_names_from_file(path: str) -> set[str]: +def _reserved_names_from_file(path: str) -> Set[str]: if os.path.exists(path): with open(path, "r") as f: return {