Skip to content

Commit

Permalink
Use PathLike[AnyStr] for local file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Feb 15, 2021
1 parent d4236df commit d9eb5c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/webdav4/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import shutil
from contextlib import contextmanager, suppress
from io import TextIOWrapper, UnsupportedOperation
from os import PathLike
from typing import (
TYPE_CHECKING,
Any,
AnyStr,
BinaryIO,
Callable,
Dict,
Expand Down Expand Up @@ -36,7 +38,6 @@

if TYPE_CHECKING:
from datetime import datetime
from os import PathLike

from .multistatus import DAVProperties, MultiStatusResponse
from .types import AuthTypes, HeaderTypes, HTTPResponse, URLTypes
Expand Down Expand Up @@ -543,7 +544,7 @@ def download_fileobj(
def download_file(
self,
from_path: str,
to_path: "PathLike[str]",
to_path: PathLike[AnyStr],
callback: Callable[[int], Any] = None,
) -> None:
"""Download file from remote path to local path."""
Expand All @@ -552,7 +553,7 @@ def download_file(

def upload_file(
self,
from_path: "PathLike[str]",
from_path: PathLike[AnyStr],
to_path: str,
overwrite: bool = False,
callback: Callable[[int], Any] = None,
Expand Down

0 comments on commit d9eb5c0

Please sign in to comment.