Skip to content

Commit f9f0caa

Browse files
committed
backwards compatibility
1 parent 815a399 commit f9f0caa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

RATapi/controls.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import tempfile
44
import warnings
55
from pathlib import Path
6+
from typing import Union
67

78
import prettytable
89
from pydantic import (
@@ -166,7 +167,7 @@ def delete_IPC(self):
166167
os.remove(self._IPCFilePath)
167168
return None
168169

169-
def save(self, path: str | Path, filename: str = "controls"):
170+
def save(self, path: Union[str, Path], filename: str = "controls"):
170171
"""Save a controls object to a JSON file.
171172
172173
Parameters
@@ -179,7 +180,7 @@ def save(self, path: str | Path, filename: str = "controls"):
179180
file.write_text(self.model_dump_json())
180181

181182
@classmethod
182-
def load(cls, path: str | Path) -> "Controls":
183+
def load(cls, path: Union[str, Path]) -> "Controls":
183184
"""Load a controls object from file.
184185
185186
Parameters

0 commit comments

Comments
 (0)