diff --git a/beets/util/hidden.py b/beets/util/hidden.py index dc0f3813c..415506be5 100644 --- a/beets/util/hidden.py +++ b/beets/util/hidden.py @@ -20,9 +20,10 @@ import os import stat import sys from pathlib import Path +from typing import Union -def is_hidden(path: bytes | Path) -> bool: +def is_hidden(path: Union[bytes, Path]) -> bool: """ Determine whether the given path is treated as a 'hidden file' by the OS. """