Fix defaults for arguments

Bump settngs
This commit is contained in:
Timmy Welch 2024-05-19 14:17:07 -07:00
parent 250d777159
commit 2897611006
4 changed files with 19 additions and 10 deletions

View File

@ -180,19 +180,21 @@ def register_runtime(parser: settngs.Manager) -> None:
parser.add_setting(
"--read-style-overlay",
type=merge.Mode,
default=merge.Mode.OVERLAY,
help="How to overlay new metadata on the current for enabled read styles (CR, CBL, etc.)",
file=False,
)
parser.add_setting(
"--source-overlay",
type=merge.Mode,
default=merge.Mode.OVERLAY,
help="How to overlay new metadata from a data source (CV, Metron, GCD, etc.) on to the current",
file=False,
)
parser.add_setting(
"--overlay-merge-lists",
action=argparse.BooleanOptionalAction,
default="",
default=True,
help="When overlaying, merge or replace lists (genres, characters, etc.)",
file=False,
)
@ -204,7 +206,7 @@ def register_runtime(parser: settngs.Manager) -> None:
file=False,
)
parser.add_setting("--no-gui", action="store_true", help="Do not open the GUI, force the commandline", file=False)
parser.add_setting("files", nargs="*", file=False)
parser.add_setting("files", nargs="*", default=[], file=False)
def register_commands(parser: settngs.Manager) -> None:
@ -216,6 +218,7 @@ def register_commands(parser: settngs.Manager) -> None:
dest="command",
action="store_const",
const=Action.print,
default=Action.gui,
help="""Print out tag info from file. Specify type\n(via --type-read) to get only info of that tag type.\n\n""",
file=False,
)
@ -232,6 +235,7 @@ def register_commands(parser: settngs.Manager) -> None:
"-c",
"--copy",
type=metadata_type_single,
default=[],
metavar=f"{{{','.join(metadata_styles).upper()}}}",
help="Copy the specified source tag block to\ndestination style specified via --type-modify\n(potentially lossy operation).\n\n",
file=False,
@ -276,6 +280,7 @@ def register_commands(parser: settngs.Manager) -> None:
dest="command",
action="store_const",
const=Action.list_plugins,
default=Action.gui,
help="List the available plugins.\n\n",
file=False,
)

View File

@ -22,7 +22,7 @@ class SettngsNS(settngs.TypedNS):
Runtime_Options__abort_on_conflict: bool
Runtime_Options__delete_original: bool
Runtime_Options__parse_filename: bool
Runtime_Options__issue_id: str
Runtime_Options__issue_id: str | None
Runtime_Options__online: bool
Runtime_Options__metadata: comicapi.genericmetadata.GenericMetadata
Runtime_Options__interactive: bool
@ -118,8 +118,8 @@ class SettngsNS(settngs.TypedNS):
Archive__rar: str
Source_comicvine__comicvine_key: str
Source_comicvine__comicvine_url: str
Source_comicvine__comicvine_key: str | None
Source_comicvine__comicvine_url: str | None
Source_comicvine__cv_use_series_start_as_volume: bool
@ -135,7 +135,7 @@ class Runtime_Options(typing.TypedDict):
abort_on_conflict: bool
delete_original: bool
parse_filename: bool
issue_id: str
issue_id: str | None
online: bool
metadata: comicapi.genericmetadata.GenericMetadata
interactive: bool
@ -148,9 +148,11 @@ class Runtime_Options(typing.TypedDict):
glob: bool
quiet: bool
json: bool
type: list[str]
type_modify: list[str]
type_read: list[str]
read_style_overlay: comicapi.merge.Mode
source_overlay: comicapi.merge.Mode
overlay_merge_lists: bool
overwrite: bool
no_gui: bool
files: list[str]
@ -162,6 +164,7 @@ class internal(typing.TypedDict):
load_data_style: list[str]
load_data_overlay: comicapi.merge.Mode
source_data_overlay: comicapi.merge.Mode
overlay_merge_lists: bool
last_opened_folder: str
window_width: int
window_height: int
@ -250,8 +253,8 @@ class Archive(typing.TypedDict):
class Source_comicvine(typing.TypedDict):
comicvine_key: str
comicvine_url: str
comicvine_key: str | None
comicvine_url: str | None
cv_use_series_start_as_volume: bool

View File

@ -30,6 +30,7 @@ class IssueResult:
class Action(utils.StrEnum):
gui = auto()
print = auto()
delete = auto()
copy = auto()

View File

@ -48,7 +48,7 @@ install_requires =
pyyaml
rapidfuzz>=2.12.0
requests==2.*
settngs==0.10.0
settngs==0.10.2
text2digits
typing-extensions>=4.3.0
wordninja