Add YAPF style + ignore, and format tracked Python files
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user