[Python-checkins] cpython: Fix some PEP 8 violations.
brett.cannon
python-checkins at python.org
Thu Jun 9 17:29:35 EDT 2016
https://hg.python.org/cpython/rev/f4a6267eace2
changeset: 101825:f4a6267eace2
user: Brett Cannon <brett at python.org>
date: Thu Jun 09 14:29:25 2016 -0700
summary:
Fix some PEP 8 violations.
files:
Lib/os.py | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/Lib/os.py b/Lib/os.py
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -876,8 +876,7 @@
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 @@
+ 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 @@
+ 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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list