Commit 5f74ebc2 authored by Brett Cannon's avatar Brett Cannon

Fix some PEP 8 violations.

parent 711d25db
...@@ -876,8 +876,7 @@ def _fscodec(): ...@@ -876,8 +876,7 @@ def _fscodec():
errors = 'surrogateescape' errors = 'surrogateescape'
def fsencode(filename): 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. encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding). 'mbcs' (which is the default encoding).
...@@ -892,8 +891,7 @@ def _fscodec(): ...@@ -892,8 +891,7 @@ def _fscodec():
+ type(filename).__name__) + type(filename).__name__)
def fsdecode(filename): 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 encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding). 'mbcs' (which is the default encoding).
...@@ -1127,14 +1125,12 @@ if not _exists('fspath'): ...@@ -1127,14 +1125,12 @@ if not _exists('fspath'):
+ path_type.__name__) + path_type.__name__)
class PathLike(abc.ABC): 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 @abc.abstractmethod
def __fspath__(self): def __fspath__(self):
""" """Return the file system path representation of the object."""
Return the file system path representation of the object.
"""
raise NotImplementedError raise NotImplementedError
@classmethod @classmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment