From 8f4860f1d937d657c2022e910f077cf38da23b5c Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Mon, 12 Aug 2024 22:53:46 +0900 Subject: [PATCH] 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 --- utils/format.py | 2 +- utils/subset.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/utils/format.py b/utils/format.py index 28363507..87042f55 100755 --- a/utils/format.py +++ b/utils/format.py @@ -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()): entry = entries[name] 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" if os.path.basename(md_path) == "public-resolvers.md": diff --git a/utils/subset.py b/utils/subset.py index 6e66eda1..a47b6634 100755 --- a/utils/subset.py +++ b/utils/subset.py @@ -1,8 +1,6 @@ #! /usr/bin/env python3 -from copyreg import constructor import sys -from glob import glob class Entry: @@ -72,8 +70,7 @@ def process(names_path, md_path): for i in range(0, len(raw_entries)): entry = Entry.parse(raw_entries[i]) if not entry: - print( - "Invalid entry: [" + raw_entries[i] + "]", file=sys.stderr) + print("Invalid entry: [" + raw_entries[i] + "]", file=sys.stderr) continue if entry.name in entries: print("Duplicate entry: [" + entry.name + "]", file=sys.stderr)