1
0
Fork 0
mirror of https://github.com/qurator-spk/modstool.git synced 2025-06-26 12:09:55 +02:00

🤓 Add type annotations (and related changes)

This commit is contained in:
Mike Gerber 2025-06-11 14:36:29 +02:00
parent 44550ff926
commit 580442a4c9
2 changed files with 32 additions and 27 deletions

View file

@ -376,7 +376,7 @@ def pages_to_dict(mets, raise_errors=True) -> List[Dict]:
@click.option('--output', '-o', 'output_file', type=click.Path(), help='Output Parquet file',
default='mods_info_df.parquet', show_default=True)
@click.option('--output-page-info', type=click.Path(), help='Output page info Parquet file')
def process(mets_files: List[str], output_file: str, output_page_info: str):
def process(mets_files: list[str], output_file: str, output_page_info: str):
"""
A tool to convert the MODS metadata in INPUT to a pandas DataFrame.
@ -389,7 +389,7 @@ def process(mets_files: List[str], output_file: str, output_page_info: str):
"""
# Extend file list if directories are given
mets_files_real = []
mets_files_real: list[str] = []
for m in mets_files:
if os.path.isdir(m):
logger.info('Scanning directory {}'.format(m))