Initial upload: API Mock CLI v0.1.0
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / type-check (push) Has been cancelled
CI / build (push) Has been cancelled
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / type-check (push) Has been cancelled
CI / build (push) Has been cancelled
This commit is contained in:
28
src/cli/options.py
Normal file
28
src/cli/options.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from typing import Optional
|
||||
import click
|
||||
|
||||
|
||||
def debug_option(f):
|
||||
return click.option(
|
||||
"--debug/--no-debug",
|
||||
default=False,
|
||||
help="Enable debug mode"
|
||||
)(f)
|
||||
|
||||
|
||||
def config_option(f):
|
||||
return click.option(
|
||||
"--config",
|
||||
type=click.Path(exists=True),
|
||||
default="config.yaml",
|
||||
help="Path to configuration file"
|
||||
)(f)
|
||||
|
||||
|
||||
def verbose_option(f):
|
||||
return click.option(
|
||||
"-v",
|
||||
"--verbose",
|
||||
count=2,
|
||||
help="Increase verbosity (use -vv for debug)"
|
||||
)(f)
|
||||
Reference in New Issue
Block a user