Add BASE_LOGO to sanic cli
This commit is contained in:
parent
a026cd7195
commit
33ee4c21b3
@ -1,11 +1,12 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
from sanic import __version__
|
from sanic import __version__
|
||||||
from sanic.app import Sanic
|
from sanic.app import Sanic
|
||||||
|
from sanic.config import BASE_LOGO
|
||||||
from sanic.log import logger
|
from sanic.log import logger
|
||||||
|
|
||||||
|
|
||||||
@ -20,7 +21,9 @@ class SanicArgumentParser(ArgumentParser):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = SanicArgumentParser(prog="sanic")
|
parser = SanicArgumentParser(
|
||||||
|
prog="sanic", description=BASE_LOGO, formatter_class=RawDescriptionHelpFormatter
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-H",
|
"-H",
|
||||||
"--host",
|
"--host",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user