Skip to content

Commit

Permalink
use old mypy syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
kat-wicks committed Jun 18, 2024
1 parent 20cbef8 commit 0a68bc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cleanlab_studio/errors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from asyncio import Handle
import pathlib
from mypy import Union


class HandledError(Exception):
Expand Down Expand Up @@ -141,7 +142,7 @@ class InvalidProjectConfiguration(HandledError):


class InvalidFilepathError(HandledError):
def __init__(self, filepath: str | pathlib.Path = "") -> None:
def __init__(self, filepath: Union[str, pathlib.Path] = "") -> None:
if isinstance(filepath, pathlib.Path):
filepath = str(filepath)
super().__init__(f"File could not be found at {filepath}. Please check the file path.")

0 comments on commit 0a68bc6

Please sign in to comment.