From c46bcf36ee76f5ef08eabe4cb616ae267a79a77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 17 Feb 2024 14:29:31 +0200 Subject: [PATCH] Remove trailing space in python source --- example/_find_fuse_parts.py | 2 +- example/xmp.py | 8 ++++---- fuse.py | 24 ++++++++++++------------ fuseparts/subbedopts.py | 2 +- setup.py | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/example/_find_fuse_parts.py b/example/_find_fuse_parts.py index 9c70de9..fa65d62 100644 --- a/example/_find_fuse_parts.py +++ b/example/_find_fuse_parts.py @@ -6,7 +6,7 @@ PYTHON_MAJOR_MINOR = "%s.%s" % (sys.version_info[0], sys.version_info[1]) ddd = realpath(join(dirname(sys.argv[0]), '..')) -for d in [ddd, '.']: +for d in [ddd, '.']: for p in glob.glob(join(d, 'build', 'lib.*%s' % PYTHON_MAJOR_MINOR)): sys.path.insert(0, p) diff --git a/example/xmp.py b/example/xmp.py index c33428f..26bee73 100644 --- a/example/xmp.py +++ b/example/xmp.py @@ -111,7 +111,7 @@ class Xmp(Fuse): # The following utimens method would do the same as the above utime method. # We can't make it better though as the Python stdlib doesn't know of # sub-second preciseness in access/modify times. -# +# # def utimens(self, path, ts_acc, ts_mod): # os.utime("." + path, (ts_acc.tv_sec, ts_mod.tv_sec)) @@ -229,11 +229,11 @@ class Xmp(Fuse): # Advisory file locking is pretty messy in Unix, and the Python # interface to this doesn't make it better. # We can't do fcntl(2)/F_GETLK from Python in a platfrom independent - # way. The following implementation *might* work under Linux. + # way. The following implementation *might* work under Linux. # # if cmd == fcntl.F_GETLK: # import struct - # + # # lockdata = struct.pack('hhQQi', kw['l_type'], os.SEEK_SET, # kw['l_start'], kw['l_len'], kw['l_pid']) # ld2 = fcntl.fcntl(self.fd, fcntl.F_GETLK, lockdata) @@ -242,7 +242,7 @@ class Xmp(Fuse): # res = {} # for i in xrange(len(uld2)): # res[flockfields[i]] = uld2[i] - # + # # return fuse.Flock(**res) # Convert fcntl-ish lock parameters to Python's weird diff --git a/fuse.py b/fuse.py index d5ecfe7..68d5e50 100644 --- a/fuse.py +++ b/fuse.py @@ -454,23 +454,23 @@ class Direntry(FuseStruct): class Flock(FuseStruct): """ Class for representing flock structures (cf. fcntl(3)). - + It makes sense to give values to the `l_type`, `l_start`, `l_len`, `l_pid` attributes (`l_whence` is not used by FUSE, see ``fuse.h``). """ def __init__(self, name=None, **kw): - + self.l_type = None self.l_start = None self.l_len = None self.l_pid = None - + kw['name'] = name FuseStruct.__init__(self, **kw) - + class Timespec(FuseStruct): """ Cf. struct timespec in time.h: @@ -478,10 +478,10 @@ class Timespec(FuseStruct): """ def __init__(self, name=None, **kw): - + self.tv_sec = None self.tv_nsec = None - + kw['name'] = name FuseStruct.__init__(self, **kw) @@ -664,13 +664,13 @@ class Fuse(object): raise RuntimeError(__name__ + """.fuse_python_api not defined. ! Please define """ + __name__ + """.fuse_python_api internally (eg. -! +! ! (1) """ + __name__ + """.fuse_python_api = """ + repr(FUSE_PYTHON_API_VERSION) + """ -! -! ) or in the enviroment (eg. -! +! +! ) or in the enviroment (eg. +! ! (2) FUSE_PYTHON_API=0.1 -! +! ! ). ! ! If you are actually developing a filesystem, probably (1) is the way to go. @@ -684,7 +684,7 @@ class Fuse(object): malformed() for i in fuse_python_api: if not isinstance(i, int) or i < 0: - malformed() + malformed() if fuse_python_api > FUSE_PYTHON_API_VERSION: raise RuntimeError(""" diff --git a/fuseparts/subbedopts.py b/fuseparts/subbedopts.py index 4103c36..c015f12 100644 --- a/fuseparts/subbedopts.py +++ b/fuseparts/subbedopts.py @@ -35,7 +35,7 @@ class SubOptsHive(object): ra = (list(self.optlist) + sa) or ["(none)"] ra.sort() - return ra + return ra def __str__(self): return "< opts: " + ", ".join(self._str_core()) + " >" diff --git a/setup.py b/setup.py index 292ea8f..ec92440 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ except ImportError: import os import sys -from fuseparts import __version__ +from fuseparts import __version__ classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -51,7 +51,7 @@ if os.system('pkg-config --exists fuse 2> /dev/null') == 0: else: if os.system('pkg-config --help 2> /dev/null') == 0: print("""pkg-config could not find fuse: -you might need to adjust PKG_CONFIG_PATH or your +you might need to adjust PKG_CONFIG_PATH or your FUSE installation is very old (older than 2.1-pre1)""") else: