Fix some linter-noticed issues
Drop some unused imports and turn `if not X in` into `if X not in`. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
parent
0c155bef07
commit
8f4860f1d9
@ -182,7 +182,7 @@ If you want to contribute changes to a resolvers list, only edit files from the
|
|||||||
for name in sorted(entries.keys()):
|
for name in sorted(entries.keys()):
|
||||||
entry = entries[name]
|
entry = entries[name]
|
||||||
out = out + "\n" + entry.format() + "\n"
|
out = out + "\n" + entry.format() + "\n"
|
||||||
if not name in INCOMPATIBLE_WITH_LEGACY_VERSIONS:
|
if name not in INCOMPATIBLE_WITH_LEGACY_VERSIONS:
|
||||||
out_legacy = out_legacy + "\n" + entry.format_legacy() + "\n"
|
out_legacy = out_legacy + "\n" + entry.format_legacy() + "\n"
|
||||||
|
|
||||||
if os.path.basename(md_path) == "public-resolvers.md":
|
if os.path.basename(md_path) == "public-resolvers.md":
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
from copyreg import constructor
|
|
||||||
import sys
|
import sys
|
||||||
from glob import glob
|
|
||||||
|
|
||||||
|
|
||||||
class Entry:
|
class Entry:
|
||||||
@ -72,8 +70,7 @@ def process(names_path, md_path):
|
|||||||
for i in range(0, len(raw_entries)):
|
for i in range(0, len(raw_entries)):
|
||||||
entry = Entry.parse(raw_entries[i])
|
entry = Entry.parse(raw_entries[i])
|
||||||
if not entry:
|
if not entry:
|
||||||
print(
|
print("Invalid entry: [" + raw_entries[i] + "]", file=sys.stderr)
|
||||||
"Invalid entry: [" + raw_entries[i] + "]", file=sys.stderr)
|
|
||||||
continue
|
continue
|
||||||
if entry.name in entries:
|
if entry.name in entries:
|
||||||
print("Duplicate entry: [" + entry.name + "]", file=sys.stderr)
|
print("Duplicate entry: [" + entry.name + "]", file=sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user