summaryrefslogtreecommitdiff
path: root/src/_pytest/pathlib.py
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-07-10 10:08:16 +0300
committerRan Benita <ran@unusedvar.com>2020-07-10 13:08:56 +0300
commit087b047426415ed46bdd5eb2d5c7c8f00294468b (patch)
tree7b50d08e2b936b63716f0a2a40c42986952c877c /src/_pytest/pathlib.py
parenta2f021b6f3618f30d0cd5604797ce5069353d864 (diff)
downloadpytest-087b047426415ed46bdd5eb2d5c7c8f00294468b.tar.gz
cacheprovider: type annotations
Diffstat (limited to 'src/_pytest/pathlib.py')
-rw-r--r--src/_pytest/pathlib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py
index dd7443f07..6a0bf7f6f 100644
--- a/src/_pytest/pathlib.py
+++ b/src/_pytest/pathlib.py
@@ -363,15 +363,15 @@ def make_numbered_dir_with_cleanup(
raise e
-def resolve_from_str(input: str, root):
+def resolve_from_str(input: str, root: py.path.local) -> Path:
assert not isinstance(input, Path), "would break on py2"
- root = Path(root)
+ rootpath = Path(root)
input = expanduser(input)
input = expandvars(input)
if isabs(input):
return Path(input)
else:
- return root.joinpath(input)
+ return rootpath.joinpath(input)
def fnmatch_ex(pattern: str, path) -> bool: