Fix some flake8 errors and cleanup
- Fix some flake8 formatting errors - Auto-format files edited - Also ignore some flake8 errors when they are intented - Update .gitignore to ingore local env
This commit is contained in:
parent
1e099724c5
commit
2e9fa38f56
|
@ -5,3 +5,4 @@
|
|||
.DS_Store
|
||||
/.tox
|
||||
__pycache__
|
||||
/env
|
|
@ -1,16 +1,16 @@
|
|||
# Copyright 2013 Hardcoded Software (http://www.hardcoded.net)
|
||||
|
||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
import sys
|
||||
|
||||
from .exceptions import TrashPermissionError
|
||||
from .exceptions import TrashPermissionError # noqa: F401
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
if sys.platform == "darwin":
|
||||
from .plat_osx import send2trash
|
||||
elif sys.platform == 'win32':
|
||||
elif sys.platform == "win32":
|
||||
from .plat_win import send2trash
|
||||
else:
|
||||
try:
|
||||
|
@ -18,4 +18,4 @@ else:
|
|||
from .plat_gio import send2trash
|
||||
except ImportError:
|
||||
# Oh well, let's fallback to our own Freedesktop trash implementation
|
||||
from .plat_other import send2trash
|
||||
from .plat_other import send2trash # noqa: F401
|
||||
|
|
|
@ -15,6 +15,6 @@ if PY3:
|
|||
# environb will be unset under Windows, but then again we're not supposed to use it.
|
||||
environb = os.environb
|
||||
else:
|
||||
text_type = unicode
|
||||
text_type = unicode # noqa: F821
|
||||
binary_type = str
|
||||
environb = os.environ
|
||||
|
|
|
@ -6,6 +6,7 @@ if PY3:
|
|||
else:
|
||||
_permission_error = OSError
|
||||
|
||||
|
||||
class TrashPermissionError(_permission_error):
|
||||
"""A permission error specific to a trash directory.
|
||||
|
||||
|
@ -20,6 +21,6 @@ class TrashPermissionError(_permission_error):
|
|||
data between partitions, devices, or network drives, so we don't do it as
|
||||
a fallback.
|
||||
"""
|
||||
|
||||
def __init__(self, filename):
|
||||
_permission_error.__init__(self, errno.EACCES, "Permission denied",
|
||||
filename)
|
||||
_permission_error.__init__(self, errno.EACCES, "Permission denied", filename)
|
||||
|
|
|
@ -17,4 +17,4 @@ if int(version().split(".", 1)[0]) >= 6:
|
|||
from .plat_win_legacy import send2trash
|
||||
else:
|
||||
# use SHFileOperation as fallback
|
||||
from .plat_win_legacy import send2trash
|
||||
from .plat_win_legacy import send2trash # noqa: F401
|
||||
|
|
Loading…
Reference in New Issue