def main(argv: Optional[Sequence[str]] = None, *, check: bool = True, **runargs) -> Optional[CompletedProcess]:
    """Run a builtin scanpy command or a scanpy-* subcommand.

    Uses :func:`subcommand.run` for the latter: ``~run(['scanpy', *argv], **runargs)``
    """
    parser = ArgumentParser(description="There are a few packages providing commands. Try e.g. `pip install scanpy-scripts`!")
    parser.set_defaults(func=parser.print_help)
    
    subparsers: DelegatingSubparsersAction = parser.add_subparsers(
        action=DelegatingSubparsersAction,
        _command='scanpy',
        _runargs={**runargs, 'check': check},
    )
    
    parser_settings = subparsers.add_parser('settings')
    parser_settings.set_defaults(func=cmd_settings)
    
    args = parser.parse_args(argv)
    return args.func()
def main ( argv : Optional [ Sequence [ str ] ] = None , * , check : bool = True , ** runargs ) -> Optional [ CompletedProcess ] : parser = ArgumentParser ( description = "There are a few packages providing commands. Try e.g. `pip install scanpy-scripts`!" ) parser . set_defaults ( func = parser . print_help ) subparsers : DelegatingSubparsersAction = parser . add_subparsers ( action = DelegatingSubparsersAction , _command = 'scanpy' , _runargs = { ** runargs , 'check' : check } , ) parser_settings = subparsers . add_parser ( 'settings' ) parser_settings . set_defaults ( func = cmd_settings ) args = parser . parse_args ( argv ) return args . func ( )
Run a builtin scanpy command or a scanpy-* subcommand.

    Uses :func:`subcommand.run` for the latter: ``~run(['scanpy', *argv], **runargs)``