Add YAPF style + ignore, and format tracked Python files
This commit is contained in:
@@ -7,7 +7,8 @@ from importlib import import_module as _import_module
|
||||
Cmdlet = Callable[[Any, Sequence[str], Dict[str, Any]], int]
|
||||
|
||||
# Registry of command-name -> cmdlet function
|
||||
REGISTRY: Dict[str, Cmdlet] = {}
|
||||
REGISTRY: Dict[str,
|
||||
Cmdlet] = {}
|
||||
|
||||
|
||||
def _normalize_cmd_name(name: str) -> str:
|
||||
@@ -52,9 +53,8 @@ import os
|
||||
|
||||
cmdlet_dir = os.path.dirname(__file__)
|
||||
for filename in os.listdir(cmdlet_dir):
|
||||
if not (
|
||||
filename.endswith(".py") and not filename.startswith("_") and filename != "__init__.py"
|
||||
):
|
||||
if not (filename.endswith(".py") and not filename.startswith("_")
|
||||
and filename != "__init__.py"):
|
||||
continue
|
||||
|
||||
mod_name = filename[:-3]
|
||||
@@ -82,7 +82,8 @@ except Exception:
|
||||
pass
|
||||
|
||||
# Import root-level modules that also register cmdlet
|
||||
for _root_mod in ("select_cmdlet",):
|
||||
for _root_mod in ("select_cmdlet",
|
||||
):
|
||||
try:
|
||||
_import_module(_root_mod)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user