From a8f137bf9571c0671ce02e359c98c9c3aae90318 Mon Sep 17 00:00:00 2001 From: ababyduck Date: Wed, 24 Apr 2019 10:09:31 -0700 Subject: [PATCH] Rename `isLegacy` to `im_legacy` for consistency and flake8 compliance --- beets/util/artresizer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/beets/util/artresizer.py b/beets/util/artresizer.py index ad1521bcf..5e3e98386 100644 --- a/beets/util/artresizer.py +++ b/beets/util/artresizer.py @@ -228,9 +228,9 @@ class ArtResizer(six.with_metaclass(Shareable, object)): def _check_method(): """Return a tuple indicating an available method and its version.""" try: - version, isLegacy = get_im_version() + version, im_legacy = get_im_version() if version: - return IMAGEMAGICK, version, isLegacy + return IMAGEMAGICK, version, im_legacy except TypeError: pass @@ -246,11 +246,11 @@ def get_im_version(): Try invoking ImageMagick's "magick". If "magick" is unavailable, as with older versions, fall back to "convert" - Our iterator `isLegacy` will be non-zero when the first command + Our iterator `im_legacy` will be non-zero when the first command fails, and will be returned in a tuple along with the version """ cmds = ('magick', 'convert') - for isLegacy, cmd in enumerate(cmds): + for im_legacy, cmd in enumerate(cmds): try: out = util.command_output([cmd, '--version']) @@ -262,7 +262,7 @@ def get_im_version(): return ((int(match.group(1)), int(match.group(2)), int(match.group(3))), - bool(isLegacy) + bool(im_legacy) ) except (subprocess.CalledProcessError, OSError) as exc: