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

@@ -32,9 +32,8 @@ def register_native_commands(registry: Dict[str, CmdletFn]) -> None:
"""Import native command modules and register their CMDLET exec functions."""
base_dir = os.path.dirname(__file__)
for filename in os.listdir(base_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]
@@ -46,5 +45,8 @@ def register_native_commands(registry: Dict[str, CmdletFn]) -> None:
except Exception as exc:
import sys
print(f"Error importing native command '{mod_name}': {exc}", file=sys.stderr)
print(
f"Error importing native command '{mod_name}': {exc}",
file=sys.stderr
)
continue