refactor: Rename load_local_blocklist -> load_blocklist_file
This commit is contained in:
parent
0ecc925373
commit
0dd6930c0f
@ -9,7 +9,7 @@ import toml
|
|||||||
from mastodon_blocklist_deploy.models import Instance
|
from mastodon_blocklist_deploy.models import Instance
|
||||||
|
|
||||||
|
|
||||||
def load_local_blocklist(filename: str) -> [Instance]:
|
def load_blocklist_file(filename: str) -> [Instance]:
|
||||||
with open(filename, "r") as f:
|
with open(filename, "r") as f:
|
||||||
data = toml.load(f)
|
data = toml.load(f)
|
||||||
instances = []
|
instances = []
|
||||||
@ -89,7 +89,7 @@ def cli():
|
|||||||
blocklist_filename = args.input_file
|
blocklist_filename = args.input_file
|
||||||
else:
|
else:
|
||||||
blocklist_filename = "../blocklist.toml"
|
blocklist_filename = "../blocklist.toml"
|
||||||
local_blocklist = load_local_blocklist(blocklist_filename)
|
local_blocklist = load_blocklist_file(blocklist_filename)
|
||||||
|
|
||||||
if args.action == "diff":
|
if args.action == "diff":
|
||||||
Instance.show_diffs(local_blocklist, remote_blocklist)
|
Instance.show_diffs(local_blocklist, remote_blocklist)
|
||||||
|
Loading…
Reference in New Issue
Block a user