1111.. seealso:: https://click.palletsprojects.com/en/8.0.x/setuptools/
1212"""
1313
14+ from __future__ import annotations
15+
1416import logging as _logging
1517import os
1618import sys
@@ -214,7 +216,7 @@ def parse(
214216 strict_clean_prefixes : bool ,
215217 output : TextIO ,
216218 embedded_mode : bool ,
217- mapping_predicate_filter : Optional [ tuple ],
219+ mapping_predicate_filter : list [ str ],
218220) -> None :
219221 """Parse a file in one of the supported formats (such as obographs) into an SSSOM TSV file."""
220222 parse_file (
@@ -239,7 +241,7 @@ def parse(
239241 multiple = True ,
240242 default = DEFAULT_VALIDATION_TYPES ,
241243)
242- def validate (input : str , validation_types : List [SchemaValidationType ]):
244+ def validate (input : str , validation_types : List [SchemaValidationType ]) -> None :
243245 """Produce an error report for an SSSOM file."""
244246 validation_type_list = [t for t in validation_types ]
245247 validate_file (input_path = input , validation_types = validation_type_list )
@@ -262,7 +264,7 @@ def split(input: str, output_directory: str) -> None:
262264 type = click .FloatRange (0 , 1 ),
263265 help = "Default confidence to be assigned if absent." ,
264266)
265- def ptable (input , output : TextIO , inverse_factor : float , default_confidence : float ) -> None :
267+ def ptable (input : str , output : TextIO , inverse_factor : float , default_confidence : float ) -> None :
266268 """Convert an SSSOM file to a ptable for kboom/`boomer <https://github.com/INCATools/boomer>`_."""
267269 # TODO should maybe move to boomer (but for now it can live here, so cjm can tweak
268270 msdf = parse_sssom_table (input )
@@ -347,10 +349,10 @@ def dosql(query: str, inputs: List[str], output: TextIO) -> None:
347349@click .option ("-P" , "--prefix" , type = click .Tuple ([str , str ]), multiple = True )
348350@output_option
349351def sparql (
350- url : str ,
351- config ,
352- graph : str ,
353- limit : int ,
352+ url : str | None ,
353+ config : TextIO | None ,
354+ graph : str | None ,
355+ limit : int | None ,
354356 object_labels : bool ,
355357 prefix : List [Tuple [str , str ]],
356358 output : TextIO ,
@@ -403,9 +405,7 @@ def diff(inputs: Tuple[str, str], output: TextIO) -> None:
403405 msdf = MappingSetDataFrame .with_converter (
404406 df = d .combined_dataframe .drop_duplicates (), converter = converter
405407 )
406- msdf .metadata [ # type:ignore
407- "comment"
408- ] = (
408+ msdf .metadata ["comment" ] = (
409409 f"Diff between { input1 } and { input2 } . See comment column for information."
410410 )
411411 write_table (msdf , output )
0 commit comments