Fixed PLW0108 (unnecessary-lambda): Lambda may be unnecessary; consider inlining inner function

This commit is contained in:
Teal Dulcet
2024-03-10 07:54:51 -04:00
committed by Joshua Tauberer
parent 3d72c32b1d
commit 67b9d0b279
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ def sort_domains(domain_names, env):
# from shortest to longest since zones are always shorter than their
# subdomains.
zones = { }
for domain in sorted(domain_names, key=lambda d : len(d)):
for domain in sorted(domain_names, key=len):
for z in zones.values():
if domain.endswith("." + z):
# We found a parent domain already in the list.