summaryrefslogtreecommitdiff
path: root/Lib/os.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-06-09 14:29:25 -0700
committerBrett Cannon <brett@python.org>2016-06-09 14:29:25 -0700
commit5f74ebc2e4afd2f385b629e74700fec49c699b1f (patch)
tree3da11ef07e83607e17034e8816be7c87c4fa77c6 /Lib/os.py
parent711d25db4802bd7341b48316d169e648285aac70 (diff)
downloadcpython-git-5f74ebc2e4afd2f385b629e74700fec49c699b1f.tar.gz
Fix some PEP 8 violations.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 56a2f7187b..67e1992836 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -876,8 +876,7 @@ def _fscodec():
errors = 'surrogateescape'
def fsencode(filename):
- """
- Encode filename (an os.PathLike, bytes, or str) to the filesystem
+ """Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
@@ -892,8 +891,7 @@ def _fscodec():
+ type(filename).__name__)
def fsdecode(filename):
- """
- Decode filename (an os.PathLike, bytes, or str) from the filesystem
+ """Decode filename (an os.PathLike, bytes, or str) from the filesystem
encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
@@ -1127,14 +1125,12 @@ if not _exists('fspath'):
+ path_type.__name__)
class PathLike(abc.ABC):
- """
- Abstract base class for implementing the file system path protocol.
- """
+
+ """Abstract base class for implementing the file system path protocol."""
+
@abc.abstractmethod
def __fspath__(self):
- """
- Return the file system path representation of the object.
- """
+ """Return the file system path representation of the object."""
raise NotImplementedError
@classmethod