mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
simplify type annotation for MetadataType
This commit is contained in:
@ -25,6 +25,11 @@ from .shell_completions import bash_completion, zsh_completion
|
||||
from . import tracebackplus
|
||||
from .exceptions import LibraryNotInstalled, ParseError
|
||||
|
||||
MetadataType = Dict[
|
||||
str,
|
||||
Optional[Union[str, int, float, List[str], datetime]]
|
||||
]
|
||||
|
||||
# make pygments import optional
|
||||
try:
|
||||
import pygments
|
||||
@ -598,7 +603,7 @@ class JcCli():
|
||||
even if there are no results.
|
||||
"""
|
||||
if self.run_timestamp:
|
||||
meta_obj: Dict[str, Optional[Union[str, int, float, List[str], datetime]]] = {
|
||||
meta_obj: MetadataType = {
|
||||
'parser': self.parser_name,
|
||||
'timestamp': self.run_timestamp.timestamp()
|
||||
}
|
||||
|
Reference in New Issue
Block a user