Removes the comprehension expression with :=
Prevents flake8 error on Focal.
This commit is contained in:
parent
f9d2d3100e
commit
a8e3f9a218
|
@ -35,14 +35,16 @@ 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]:
|
||||||
|
names = set()
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
with open(path, "r") as f:
|
with open(path, "r") as f:
|
||||||
return {
|
for line in f:
|
||||||
s.split()[0] for line in f.readlines()
|
line = line.strip()
|
||||||
if (s := line.strip()) and not s.startswith("#")
|
if not line or line.startswith('#'):
|
||||||
}
|
continue
|
||||||
else:
|
names.add(line.split()[0])
|
||||||
return set()
|
|
||||||
|
return names
|
||||||
|
|
||||||
|
|
||||||
class IdentityController(SubiquityController):
|
class IdentityController(SubiquityController):
|
||||||
|
|
Loading…
Reference in New Issue