lists: introduce obfuscated formats
This commit is contained in:
parent
b1f7426beb
commit
6fe633bf0a
9 changed files with 64 additions and 24 deletions
|
@ -2,24 +2,16 @@ import argparse
|
|||
import json
|
||||
import logging
|
||||
import sys
|
||||
from typing import Callable, TYPE_CHECKING, Any, Dict
|
||||
from typing import Callable, TYPE_CHECKING, Any
|
||||
|
||||
from app import app
|
||||
from app.lists.bc2 import mirror_sites
|
||||
from app.lists.bridgelines import bridgelines
|
||||
from app.lists.mirror_mapping import mirror_mapping
|
||||
from app.lists import lists
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_SubparserType = argparse._SubParsersAction[argparse.ArgumentParser]
|
||||
else:
|
||||
_SubparserType = Any
|
||||
|
||||
lists: Dict[str, Callable[[], Any]] = {
|
||||
"mirror_mapping": mirror_mapping,
|
||||
"bc2": mirror_sites,
|
||||
"bridgelines": bridgelines,
|
||||
}
|
||||
|
||||
|
||||
def dump(list_f: Callable[[], Any]) -> None:
|
||||
json.dump(list_f(), sys.stdout, indent=2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue