If /usr/bin/isort is found, run it during "make format" to get a defined way the imports are sorted. tool.isort in pyproject.toml is updated to match the other fixers. Commit the fallout of this change. Running the other fixers alone doesn't change the formatting, so this should be safe. Signed-off-by: Jan Lindemann <jan@janware.com>
30 lines
715 B
Python
30 lines
715 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING, override
|
|
|
|
from .Cmd import Cmd, Parent
|
|
|
|
if TYPE_CHECKING:
|
|
from argparse import ArgumentParser, Namespace
|
|
|
|
class CmdCheck(Cmd): # export
|
|
|
|
def __init__(self, parent: Parent) -> None:
|
|
super().__init__(
|
|
parent,
|
|
'check',
|
|
help = 'Run miscellaneous code and project checks',
|
|
)
|
|
self.load_subcommands()
|
|
|
|
@override
|
|
async def _run(self, args: Namespace) -> None:
|
|
import sys
|
|
|
|
# Missing subcommand
|
|
self.parser.print_help()
|
|
sys.exit(1)
|
|
|
|
@override
|
|
def add_arguments(self, parser: ArgumentParser) -> None:
|
|
super().add_arguments(parser)
|