Skip to content

Commit b48be47

Browse files
committed
backwards compatibility
1 parent e9d641c commit b48be47

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 (
@@ -222,7 +223,7 @@ def delete_IPC(self):
222223
os.remove(self._IPCFilePath)
223224
return None
224225

225-
def save(self, path: str | Path, filename: str = "controls"):
226+
def save(self, path: Union[str, Path], filename: str = "controls"):
226227
"""Save a controls object to a JSON file.
227228
228229
Parameters
@@ -235,7 +236,7 @@ def save(self, path: str | Path, filename: str = "controls"):
235236
file.write_text(self.model_dump_json())
236237

237238
@classmethod
238-
def load(cls, path: str | Path) -> "Controls":
239+
def load(cls, path: Union[str, Path]) -> "Controls":
239240
"""Load a controls object from file.
240241
241242
Parameters

0 commit comments

Comments
 (0)