The formatting of grml2usb that was done with black, version 18.9b0
triggers changes with black 20.8b1-3 as present in current
Debian/unstable:
| black --check grml2usb
| would reformat grml2usb
| Oh no! 💥 💔 💥
| 1 file would be reformatted.
| make[2]: *** [Makefile:44: codecheck] Error 1
Applying the change via modern black though doesn't lead to any
changes with black, version 18.9b0, so let's use this.
Gbp-Dch: Ignore
def syslinux_warning(option, opt, opt_parser):
def syslinux_warning(option, opt, opt_parser):
- """A helper function for printing a warning about deprecated option
- """
+ """A helper function for printing a warning about deprecated option"""
# pylint: disable-msg=W0613
sys.stderr.write(
"Note: the --syslinux option is deprecated as syslinux "
# pylint: disable-msg=W0613
sys.stderr.write(
"Note: the --syslinux option is deprecated as syslinux "
# if grub option is set, unset syslinux option
def grub_option(option, opt, opt_parser):
# if grub option is set, unset syslinux option
def grub_option(option, opt, opt_parser):
- """A helper function adjusting other option values
- """
+ """A helper function adjusting other option values"""
# pylint: disable-msg=W0613
setattr(opt_parser.values, option.dest, True)
setattr(opt_parser.values, "syslinux", False)
# pylint: disable-msg=W0613
setattr(opt_parser.values, option.dest, True)
setattr(opt_parser.values, "syslinux", False)
- """Cleanup function to make sure there aren't any mounted devices left behind.
- """
+ """Cleanup function to make sure there aren't any mounted devices left behind."""
def del_failed(_fn, path, _exc):
logging.warning("Deletion of %s failed in temporary folder", path)
def del_failed(_fn, path, _exc):
logging.warning("Deletion of %s failed in temporary folder", path)
def get_defaults_file(iso_mount, flavour, name):
def get_defaults_file(iso_mount, flavour, name):
- """get the default file for syslinux
- """
+ """get the default file for syslinux"""
bootloader_dirs = ["/boot/isolinux/", "/boot/syslinux/"]
for directory in bootloader_dirs:
for name in name, "%s_%s" % (get_flavour_filename(flavour), name):
bootloader_dirs = ["/boot/isolinux/", "/boot/syslinux/"]
for directory in bootloader_dirs:
for name in name, "%s_%s" % (get_flavour_filename(flavour), name):
def get_flavour(flavour_str):
def get_flavour(flavour_str):
- """Returns the flavour of a grml version string
- """
+ """Returns the flavour of a grml version string"""
return re.match(r"[\w-]*", flavour_str).group()
return re.match(r"[\w-]*", flavour_str).group()
def remove_mountpoint(mountpoint):
def remove_mountpoint(mountpoint):
- """remove a registered mountpoint
- """
+ """remove a registered mountpoint"""
try:
unmount(mountpoint, "")
try:
unmount(mountpoint, "")