Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5f74ebc2
Commit
5f74ebc2
authored
Jun 09, 2016
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some PEP 8 violations.
parent
711d25db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
Lib/os.py
Lib/os.py
+6
-10
No files found.
Lib/os.py
View file @
5f74ebc2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment