Skip to content

Commit

Permalink
fix PathLike typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Feb 16, 2021
1 parent d9eb5c0 commit 50ac7ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ disable=print-statement,
cyclic-import,
fixme,
design,
ungrouped-imports,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
9 changes: 4 additions & 5 deletions src/webdav4/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
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 @@ -38,11 +36,12 @@

if TYPE_CHECKING:
from datetime import datetime
from os import PathLike
from typing import AnyStr

from .multistatus import DAVProperties, MultiStatusResponse
from .types import AuthTypes, HeaderTypes, HTTPResponse, URLTypes


logger = logging.getLogger(__name__)


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

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

0 comments on commit 50ac7ac

Please sign in to comment.