[util.hidden] use 'typing.Union' instead of '|'

This commit is contained in:
Arav K. 2024-06-27 15:05:14 +02:00
parent f9b683225b
commit b51f4cbd91

View file

@ -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.
"""