@@ -43,8 +43,8 @@ class MappingInterval(NamedTuple):
4343
4444
4545def _validate_path_pair (
46- in_file : Path | PathLike [str ] | str ,
47- out_file : Path | PathLike [str ] | str | None ,
46+ in_file : PathLike [str ] | str ,
47+ out_file : PathLike [str ] | str | None ,
4848) -> tuple [Path , Path ]:
4949 in_file_valid = Path (in_file )
5050
@@ -74,22 +74,22 @@ def _validate_path_pair(
7474
7575
7676def map_symbols_csv (
77- symbology_file : Path | PathLike [str ] | str ,
78- csv_file : Path | PathLike [str ] | str ,
79- out_file : Path | PathLike [str ] | str | None = None ,
77+ symbology_file : PathLike [str ] | str ,
78+ csv_file : PathLike [str ] | str ,
79+ out_file : PathLike [str ] | str | None = None ,
8080) -> Path :
8181 """
8282 Use a `symbology.json` file to map a symbols column onto an existing CSV
8383 file. The result is written to `out_file`.
8484
8585 Parameters
8686 ----------
87- symbology_file: Path | PathLike[str] | str
87+ symbology_file: PathLike[str] | str
8888 Path to a `symbology.json` file to use as a symbology source.
89- csv_file: Path | PathLike[str] | str
89+ csv_file: PathLike[str] | str
9090 Path to a CSV file that contains encoded DBN data; must contain
9191 a `ts_recv` or `ts_event` and `instrument_id` column.
92- out_file: Path | PathLike[str] | str (optional)
92+ out_file: PathLike[str] | str (optional)
9393 Path to a file to write results to. If unspecified, `_mapped` will be
9494 appended to the `csv_file` name.
9595
@@ -119,21 +119,21 @@ def map_symbols_csv(
119119
120120
121121def map_symbols_json (
122- symbology_file : Path | PathLike [str ] | str ,
123- json_file : Path | PathLike [str ] | str ,
124- out_file : Path | PathLike [str ] | str | None = None ,
122+ symbology_file : PathLike [str ] | str ,
123+ json_file : PathLike [str ] | str ,
124+ out_file : PathLike [str ] | str | None = None ,
125125) -> Path :
126126 """
127127 Use a `symbology.json` file to insert a symbols key into records of an
128128 existing JSON file. The result is written to `out_file`.
129129
130130 Parameters
131131 ----------
132- symbology_file: Path | PathLike[str] | str
132+ symbology_file: PathLike[str] | str
133133 Path to a `symbology.json` file to use as a symbology source.
134- json_file: Path | PathLike[str] | str
134+ json_file: PathLike[str] | str
135135 Path to a JSON file that contains encoded DBN data.
136- out_file: Path | PathLike[str] | str (optional)
136+ out_file: PathLike[str] | str (optional)
137137 Path to a file to write results to. If unspecified, `_mapped` will be
138138 appended to the `json_file` name.
139139
@@ -243,7 +243,9 @@ def insert_metadata(self, metadata: Metadata) -> None:
243243 return
244244
245245 stype_in = SType (metadata .stype_in ) if metadata .stype_in is not None else None
246- stype_out = SType (metadata .stype_out ) if metadata .stype_out is not None else None
246+ stype_out = (
247+ SType (metadata .stype_out ) if metadata .stype_out is not None else None
248+ )
247249
248250 for symbol_in , entries in metadata .mappings .items ():
249251 for entry in entries :
@@ -395,19 +397,19 @@ def insert_json(
395397
396398 def map_symbols_csv (
397399 self ,
398- csv_file : Path | PathLike [str ] | str ,
399- out_file : Path | PathLike [str ] | str | None = None ,
400+ csv_file : PathLike [str ] | str ,
401+ out_file : PathLike [str ] | str | None = None ,
400402 ) -> Path :
401403 """
402404 Use the loaded symbology data to map a symbols column onto an existing
403405 CSV file. The result is written to `out_file`.
404406
405407 Parameters
406408 ----------
407- csv_file: Path | PathLike[str] | str
409+ csv_file: PathLike[str] | str
408410 Path to a CSV file that contains encoded DBN data; must contain
409411 a `ts_recv` or `ts_event` and `instrument_id` column.
410- out_file: Path | PathLike[str] | str (optional)
412+ out_file: PathLike[str] | str (optional)
411413 Path to a file to write results to. If unspecified, `_mapped` will be
412414 appended to the `csv_file` name.
413415
@@ -474,18 +476,18 @@ def map_symbols_csv(
474476
475477 def map_symbols_json (
476478 self ,
477- json_file : Path | PathLike [str ] | str ,
478- out_file : Path | PathLike [str ] | str | None = None ,
479+ json_file : PathLike [str ] | str ,
480+ out_file : PathLike [str ] | str | None = None ,
479481 ) -> Path :
480482 """
481483 Use the loaded symbology data to insert a symbols key into records of
482484 an existing JSON file. The result is written to `out_file`.
483485
484486 Parameters
485487 ----------
486- json_file: Path | PathLike[str] | str
488+ json_file: PathLike[str] | str
487489 Path to a JSON file that contains encoded DBN data.
488- out_file: Path | PathLike[str] | str (optional)
490+ out_file: PathLike[str] | str (optional)
489491 Path to a file to write results to. If unspecified, `_mapped` will be
490492 appended to the `json_file` name.
491493
0 commit comments