diff options
author | Anthony Sottile <asottile@umich.edu> | 2019-06-02 15:32:00 -0700 |
---|---|---|
committer | Bruno Oliveira <bruno@esss.com.br> | 2019-06-03 12:08:02 -0300 |
commit | a91fe1feddbded535a4322ab854429e3a3961fb4 (patch) | |
tree | f49d6841e4b293a850738bf6a0031e101ecebfe8 /src/_pytest/pathlib.py | |
parent | 3f1ec520fcb88fd4051829e660b6faefc1c542ea (diff) | |
download | pytest-a91fe1feddbded535a4322ab854429e3a3961fb4.tar.gz |
pre-commit run pyupgrade --all-files
Diffstat (limited to 'src/_pytest/pathlib.py')
-rw-r--r-- | src/_pytest/pathlib.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index 5ffaa84e1..09b1bb3d5 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -13,8 +13,6 @@ from os.path import isabs from os.path import sep from posixpath import sep as posix_sep -import six - if sys.version_info[:2] >= (3, 6): from pathlib import Path, PurePath @@ -128,9 +126,10 @@ def create_cleanup_lock(p): fd = os.open(str(lock_path), os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o644) except OSError as e: if e.errno == errno.EEXIST: - six.raise_from( - EnvironmentError("cannot create lockfile in {path}".format(path=p)), e - ) + raise EnvironmentError( + "cannot create lockfile in {path}".format(path=p) + ) from e + else: raise else: @@ -296,7 +295,7 @@ def fnmatch_ex(pattern, path): if sep not in pattern: name = path.name else: - name = six.text_type(path) + name = str(path) return fnmatch.fnmatch(name, pattern) |