autopep8: Update with changes to make autopep8 -a -a -a happy

This commit is contained in:
Brian C. Lane 2023-08-07 10:08:32 -07:00 committed by Simon de Vlieger
parent a7541ad8b4
commit 44c28c8c16
26 changed files with 66 additions and 59 deletions

View file

@ -575,7 +575,7 @@ class FsCache(contextlib.AbstractContextManager, os.PathLike):
raise
return (name, lockfd)
except:
except BaseException:
# On error, we might have already created the directory or even
# linked the lock-file. Try unlinking both, but ignore errors if
# they do not exist. Due to using UUIDs as names we cannot conflict
@ -703,7 +703,7 @@ class FsCache(contextlib.AbstractContextManager, os.PathLike):
self._active = True
return self
except:
except BaseException:
self.__exit__(None, None, None)
raise

View file

@ -216,7 +216,7 @@ class Socket(contextlib.AbstractContextManager):
# default destination for send operations.
if connect_to is not None:
sock.connect(os.fspath(connect_to))
except:
except BaseException:
if sock is not None:
sock.close()
raise
@ -255,7 +255,7 @@ class Socket(contextlib.AbstractContextManager):
sock.bind(os.fspath(bind_to))
unlink = os.open(os.path.join(".", path[0]), os.O_CLOEXEC | os.O_PATH)
sock.setblocking(False)
except:
except BaseException:
if unlink is not None:
os.close(unlink)
if sock is not None:

View file

@ -177,9 +177,9 @@ def brace_expand(s):
result = []
right = s.find('}')
left = s[:right].rfind('{')
prefix, choices, suffix = s[:left], s[left+1:right], s[right+1:]
prefix, choices, suffix = s[:left], s[left + 1:right], s[right + 1:]
for choice in choices.split(','):
result.extend(brace_expand(prefix+choice+suffix))
result.extend(brace_expand(prefix + choice + suffix))
return result

View file

@ -286,7 +286,7 @@ class MDAHeader(Header):
"magic": "16s", # int8_t[16] // Allows to scan for metadata
"version": "L", # uint32_t
"start": "Q", # uint64_t // Absolute start byte of itself
"size": "Q" # uint64_t // Size of metadata area
"size": "Q" # uint64_t // Size of metadata area
})
# followed by a null termiated list of type `RawLocN`
@ -419,7 +419,7 @@ class Metadata:
r"\]": " ]",
r'"': ' " ',
r"[=,]": "",
r"\s+": " ",
r"\s+": " ",
r"\0$": "",
}
@ -537,7 +537,7 @@ class Disk:
try:
self._init_headers()
except: # pylint: disable=broad-except
except BaseException: # pylint: disable=broad-except
self.fp.close()
raise