Add YAPF style + ignore, and format tracked Python files

This commit is contained in:
2025-12-29 18:42:02 -08:00
parent c019c00aed
commit 507946a3e4
108 changed files with 11664 additions and 6494 deletions

View File

@@ -27,7 +27,11 @@ def _examples_for_cmd(name: str) -> List[str]:
return lookup.get(key, [])
def _find_cmd_metadata(name: str, metadata: Dict[str, Dict[str, Any]]) -> Optional[Dict[str, Any]]:
def _find_cmd_metadata(name: str,
metadata: Dict[str,
Dict[str,
Any]]) -> Optional[Dict[str,
Any]]:
target = name.replace("_", "-").lower()
for cmd_name, meta in metadata.items():
if target == cmd_name:
@@ -39,7 +43,11 @@ def _find_cmd_metadata(name: str, metadata: Dict[str, Dict[str, Any]]) -> Option
def _render_list(
metadata: Dict[str, Dict[str, Any]], filter_text: Optional[str], args: Sequence[str]
metadata: Dict[str,
Dict[str,
Any]],
filter_text: Optional[str],
args: Sequence[str]
) -> None:
table = ResultTable("Help")
table.set_source_command(".help", list(args))
@@ -143,7 +151,9 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
try:
import cmdlet_catalog as _catalog
CMDLET.arg[0].choices = _normalize_choice_list(_catalog.list_cmdlet_names(config=config))
CMDLET.arg[0].choices = _normalize_choice_list(
_catalog.list_cmdlet_names(config=config)
)
metadata = _catalog.list_cmdlet_metadata(config=config)
except Exception:
CMDLET.arg[0].choices = []
@@ -168,7 +178,8 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
CMDLET = Cmdlet(
name=".help",
alias=["help", "?"],
alias=["help",
"?"],
summary="Show cmdlet or detailed help",
usage=".help [cmd] [-filter text]",
arg=[