Compare commits
3 Commits
plugin-rev
...
3f6facf45b
Author | SHA1 | Date | |
---|---|---|---|
3f6facf45b | |||
94f325a088 | |||
ebd7fae059 |
@ -590,9 +590,6 @@ class CLI:
|
||||
self.output(f"Processing {utils.path_to_short_str(ca.path)}...")
|
||||
|
||||
md, tags_read = self.create_local_metadata(ca, self.config.Runtime_Options__tags_read)
|
||||
if md.issue is None or md.issue == "":
|
||||
if self.config.Auto_Tag__assume_issue_one:
|
||||
md.issue = "1"
|
||||
|
||||
matches: list[IssueResult] = []
|
||||
# now, search online
|
||||
@ -629,11 +626,15 @@ class CLI:
|
||||
return res, match_results
|
||||
|
||||
else:
|
||||
qt_md = self.try_quick_tag(ca, md)
|
||||
query_md = md.copy()
|
||||
qt_md = self.try_quick_tag(ca, query_md)
|
||||
if query_md.issue is None or query_md.issue == "":
|
||||
if self.config.Auto_Tag__assume_issue_one:
|
||||
query_md.issue = "1"
|
||||
if qt_md is None or qt_md.is_empty:
|
||||
if qt_md is not None:
|
||||
self.output("Failed to find match via quick tag")
|
||||
ct_md, matches, res, match_results = self.normal_tag(ca, tags_read, md, match_results) # type: ignore[assignment]
|
||||
ct_md, matches, res, match_results = self.normal_tag(ca, tags_read, query_md, match_results) # type: ignore[assignment]
|
||||
if res is not None:
|
||||
return res, match_results
|
||||
else:
|
||||
|
@ -194,7 +194,7 @@ def parse_metadata_from_string(mdstr: str) -> GenericMetadata:
|
||||
else:
|
||||
value = t(value)
|
||||
except (ValueError, TypeError):
|
||||
raise argparse.ArgumentTypeError(f"Invalid syntax for tag '{key}': {value}")
|
||||
raise argparse.ArgumentTypeError(f"Invalid syntax for tag {key!r}: {value!r}")
|
||||
return value
|
||||
|
||||
md = GenericMetadata()
|
||||
@ -240,6 +240,8 @@ def parse_metadata_from_string(mdstr: str) -> GenericMetadata:
|
||||
else:
|
||||
raise argparse.ArgumentTypeError(f"'{key}' is not a valid tag name")
|
||||
md.is_empty = empty
|
||||
except argparse.ArgumentTypeError as e:
|
||||
raise e
|
||||
except Exception as e:
|
||||
logger.exception("Unable to read metadata from the commandline '%s'", mdstr)
|
||||
raise Exception("Unable to read metadata from the commandline") from e
|
||||
|
Reference in New Issue
Block a user