Skip to content

Commit b272624

Browse files
committed
backwards compatibility
1 parent 6d74726 commit b272624

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

RATapi/utils/orso.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def load_ort_data(filepath: str) -> Union[Data, list[Data]]:
2020
2121
Returns
2222
-------
23-
Data | list[Data]
23+
Data or list[Data]
2424
If the .ort file contains one dataset, just the data model.
2525
If it contains multiple datasets, returns a list of data models.
2626
@@ -102,11 +102,13 @@ class ORSOSample:
102102
bulk_in: Parameter
103103
bulk_out: Parameter
104104
parameters: ClassList[Parameter]
105-
layers: ClassList[Layer] | ClassList[AbsorptionLayer]
105+
layers: Union[ClassList[Layer], ClassList[AbsorptionLayer]]
106106
model: list[str]
107107

108108

109-
def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str, absorption: bool = False) -> ORSOSample:
109+
def orso_model_to_rat(
110+
model: Union[orsopy.fileio.model_language.SampleModel, str], absorption: bool = False
111+
) -> ORSOSample:
110112
"""Get information from an ORSO SampleModel object.
111113
112114
Parameters

0 commit comments

Comments
 (0)