77
88# The collections.abc (rather than typing) versions don't support subscripting until 3.9
99# from collections import Iterable
10- from typing import Iterable , Mapping , Any , Dict , Optional , Tuple , Union , overload
10+ from typing import Iterable , Mapping , Any , Optional , Union , overload
1111import warnings
1212
1313import click
9999@click .option ("--verbose" , is_flag = True )
100100def determine_file_name_main (
101101 files : Iterable [pathlib .Path ],
102- defaults : Iterable [Tuple [str , str ]],
103- overrides : Iterable [Tuple [str , str ]],
102+ defaults : Iterable [tuple [str , str ]],
103+ overrides : Iterable [tuple [str , str ]],
104104 current_name : bool ,
105105 delimiter : str ,
106106 verbose : bool ,
@@ -165,8 +165,8 @@ def determine_file_name(
165165 defined as a parameter to maintain syntactic simplicity when calling.
166166
167167 :param pathlib.Path file_path: Path to the file for which to determine name
168- :param Dict [str, Any] defaults: Default name properties to use when properties can't be determined
169- :param Dict [str, Any] overrides: Name properties that should override anything detected in the file
168+ :param dict [str, Any] defaults: Default name properties to use when properties can't be determined
169+ :param dict [str, Any] overrides: Name properties that should override anything detected in the file
170170 :raises NotImplementedError: For files that we should support but currently don't (bia, iox, obx, sum, tro)
171171 :return str: Proposed IGS long filename
172172 """
@@ -182,7 +182,7 @@ def determine_properties_from_contents_and_filename(
182182 file_path : pathlib .Path ,
183183 defaults : Optional [Mapping [str , Any ]] = None ,
184184 overrides : Optional [Mapping [str , Any ]] = None ,
185- ) -> Dict [str , Any ]:
185+ ) -> dict [str , Any ]:
186186 """Determine the properties of a file based on its contents
187187
188188 The function reads both the existing filename of the provided file as well as
@@ -204,8 +204,8 @@ def determine_properties_from_contents_and_filename(
204204 - project: str
205205
206206 :param pathlib.Path file_path: Path to the file for which to determine properties
207- :param Dict [str, Any] defaults: Default name properties to use when properties can't be determined
208- :param Dict [str, Any] overrides: Name properties that should override anything detected in the file
207+ :param dict [str, Any] defaults: Default name properties to use when properties can't be determined
208+ :param dict [str, Any] overrides: Name properties that should override anything detected in the file
209209 :raises NotImplementedError: For files that we should support but currently don't (bia, iox, obx, sum, tro)
210210 :return str: Dictionary of file properties
211211 """
@@ -459,15 +459,15 @@ def convert_nominal_span(nominal_span: str) -> datetime.timedelta:
459459 return datetime .timedelta ()
460460
461461
462- def determine_clk_name_props (file_path : pathlib .Path ) -> Dict [str , Any ]:
462+ def determine_clk_name_props (file_path : pathlib .Path ) -> dict [str , Any ]:
463463 """Determine the IGS filename properties for a CLK files
464464
465465 Like all functions in this series, the function reads both a filename and the files contents
466466 to determine properties that can be used to describe the expected IGS long filename. The
467467 function returns a dictionary with any properties it manages to successfully determine.
468468
469469 :param pathlib.Path file_path: file for which to determine name properties
470- :return Dict [str, Any]: dictionary containing the extracted name properties
470+ :return dict [str, Any]: dictionary containing the extracted name properties
471471 """
472472 name_props = {}
473473 try :
@@ -519,15 +519,15 @@ def determine_clk_name_props(file_path: pathlib.Path) -> Dict[str, Any]:
519519 return name_props
520520
521521
522- def determine_erp_name_props (file_path : pathlib .Path ) -> Dict [str , Any ]:
522+ def determine_erp_name_props (file_path : pathlib .Path ) -> dict [str , Any ]:
523523 """Determine the IGS filename properties for a ERP files
524524
525525 Like all functions in this series, the function reads both a filename and the files contents
526526 to determine properties that can be used to describe the expected IGS long filename. The
527527 function returns a dictionary with any properties it manages to successfully determine.
528528
529529 :param pathlib.Path file_path: file for which to determine name properties
530- :return Dict [str, Any]: dictionary containing the extracted name properties
530+ :return dict [str, Any]: dictionary containing the extracted name properties
531531 """
532532 name_props = {}
533533 try :
@@ -574,15 +574,15 @@ def determine_erp_name_props(file_path: pathlib.Path) -> Dict[str, Any]:
574574 return name_props
575575
576576
577- def determine_snx_name_props (file_path : pathlib .Path ) -> Dict [str , Any ]:
577+ def determine_snx_name_props (file_path : pathlib .Path ) -> dict [str , Any ]:
578578 """Determine the IGS filename properties for a SINEX files
579579
580580 Like all functions in this series, the function reads both a filename and the files contents
581581 to determine properties that can be used to describe the expected IGS long filename. The
582582 function returns a dictionary with any properties it manages to successfully determine.
583583
584584 :param pathlib.Path file_path: file for which to determine name properties
585- :return Dict [str, Any]: dictionary containing the extracted name properties
585+ :return dict [str, Any]: dictionary containing the extracted name properties
586586 """
587587 name_props = {}
588588 try :
@@ -668,7 +668,7 @@ def determine_snx_name_props(file_path: pathlib.Path) -> Dict[str, Any]:
668668
669669def determine_sp3_name_props (
670670 file_path : pathlib .Path , strict_mode : type [StrictMode ] = StrictModes .STRICT_WARN
671- ) -> Dict [str , Any ]:
671+ ) -> dict [str , Any ]:
672672 """Determine the IGS filename properties for a SP3 files
673673
674674 Like all functions in this series, the function reads both a filename and the files contents
@@ -678,7 +678,7 @@ def determine_sp3_name_props(
678678 :param pathlib.Path file_path: file for which to determine name properties
679679 :param type[StrictMode] strict_mode: indicates whether to raise, warn, or silently continue on errors such as
680680 failure to get properties from a filename.
681- :return Dict [str, Any]: dictionary containing the extracted name properties. May be empty on some errors, if
681+ :return dict [str, Any]: dictionary containing the extracted name properties. May be empty on some errors, if
682682 strict_mode is not set to RAISE.
683683 :raises ValueError: if strict_mode set to RAISE, and unable to statically extract properties from a filename
684684 """
0 commit comments