mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
Merge pull request #2228 from Suor/urlinfo-isin
remote: optimize UrlInfo.isin()
This commit is contained in:
+2
-2
@@ -172,7 +172,7 @@ class URLInfo(object):
|
||||
|
||||
@cached_property
|
||||
def _path(self):
|
||||
return pathlib.PurePosixPath(self.parsed.path)
|
||||
return PosixPathInfo(self.parsed.path)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
@@ -210,7 +210,7 @@ class URLInfo(object):
|
||||
return (
|
||||
self.scheme == other.scheme
|
||||
and self.netloc == other.netloc
|
||||
and PathInfo(self.path).isin(PathInfo(other.path))
|
||||
and self._path.isin(other._path)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user