From 73b5fbe493d81351c1e383ccfca0f8702cbfa4b0 Mon Sep 17 00:00:00 2001 From: Christoph Berganski Date: Tue, 21 Jul 2020 18:52:29 +0200 Subject: [PATCH] tree,remote: WebDAV is written with capitalized 'DAV'... Refs iterative#1153 --- dvc/exceptions.py | 2 +- dvc/path_info.py | 2 +- dvc/tree/__init__.py | 8 ++++---- dvc/tree/webdav.py | 10 +++++----- dvc/tree/webdavs.py | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dvc/exceptions.py b/dvc/exceptions.py index ff488125c6..b5b49ba1db 100644 --- a/dvc/exceptions.py +++ b/dvc/exceptions.py @@ -299,7 +299,7 @@ def __init__(self, code, reason): super().__init__(f"'{code} {reason}'") -class WebdavConfigError(DvcException): +class WebDAVConfigError(DvcException): def __init__(self, host): super().__init__(f"Configuration for WebDAV {host} is invalid.") diff --git a/dvc/path_info.py b/dvc/path_info.py index 13fb84fe31..281882a9bf 100644 --- a/dvc/path_info.py +++ b/dvc/path_info.py @@ -318,7 +318,7 @@ def __eq__(self, other): # See https://github.com/shizacat/dvc/blob/remote-webdav/dvc/path_info.py -class WebdavURLInfo(HTTPURLInfo): +class WebDAVURLInfo(HTTPURLInfo): @cached_property def url(self): return "{}://{}{}{}{}{}".format( diff --git a/dvc/tree/__init__.py b/dvc/tree/__init__.py index efef52b3e6..b9a38325c5 100644 --- a/dvc/tree/__init__.py +++ b/dvc/tree/__init__.py @@ -11,8 +11,8 @@ from .oss import OSSTree from .s3 import S3Tree from .ssh import SSHTree -from .webdav import WebdavTree -from .webdavs import WebdavsTree +from .webdav import WebDAVTree +from .webdavs import WebDAVSTree TREES = [ AzureTree, @@ -24,8 +24,8 @@ S3Tree, SSHTree, OSSTree, - WebdavTree, - WebdavsTree, + WebDAVTree, + WebDAVSTree, # NOTE: LocalTree is the default ] diff --git a/dvc/tree/webdav.py b/dvc/tree/webdav.py index daa0d2a33f..713d883822 100644 --- a/dvc/tree/webdav.py +++ b/dvc/tree/webdav.py @@ -3,8 +3,8 @@ from funcy import cached_property, wrap_prop -from dvc.exceptions import DvcException, WebdavConfigError -from dvc.path_info import WebdavURLInfo +from dvc.exceptions import DvcException, WebDAVConfigError +from dvc.path_info import WebDAVURLInfo from dvc.scheme import Schemes from .base import BaseTree @@ -13,12 +13,12 @@ logger = logging.getLogger(__name__) -class WebdavTree(BaseTree): # pylint:disable=abstract-method +class WebDAVTree(BaseTree): # pylint:disable=abstract-method # Use webdav scheme scheme = Schemes.WEBDAV # URLInfo for Webdav ~ replaces webdav -> http - PATH_CLS = WebdavURLInfo + PATH_CLS = WebDAVURLInfo # Non traversable as walk_files is not implemented CAN_TRAVERSE = False @@ -108,7 +108,7 @@ def _client(self): # Check whether client options are valid if not client.valid(): - raise WebdavConfigError(hostname) + raise WebDAVConfigError(hostname) # Return constructed client (cached) return client diff --git a/dvc/tree/webdavs.py b/dvc/tree/webdavs.py index 68e8891b27..570079507a 100644 --- a/dvc/tree/webdavs.py +++ b/dvc/tree/webdavs.py @@ -1,7 +1,7 @@ from dvc.scheme import Schemes -from .webdav import WebdavTree +from .webdav import WebDAVTree -class WebdavsTree(WebdavTree): # pylint:disable=abstract-method +class WebDAVSTree(WebDAVTree): # pylint:disable=abstract-method scheme = Schemes.WEBDAVS