From 9675984510991db897b5b7d474b02e3b838e8ad8 Mon Sep 17 00:00:00 2001 From: Kai Willadsen Date: Sat, 16 Dec 2023 15:05:19 +1000 Subject: [PATCH] More lint fixes --- bin/meld | 4 ++-- maint | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/meld b/bin/meld index 4fbc12ce..fa6ad0d3 100755 --- a/bin/meld +++ b/bin/meld @@ -108,6 +108,7 @@ elif frozen: # TODO: Possibly move to elib.intl import gettext # noqa: E402, I100 + locale_domain = meld.conf.__package__ locale_dir = meld.conf.LOCALEDIR @@ -256,8 +257,7 @@ def check_requirements(): def setup_resources(): - from gi.repository import Gio - from gi.repository import GtkSource + from gi.repository import Gio, GtkSource resource_filename = meld.conf.APPLICATION_ID + ".gresource" resource_file = os.path.join(meld.conf.DATADIR, resource_filename) diff --git a/maint b/maint index f44161f3..735591b4 100755 --- a/maint +++ b/maint @@ -168,8 +168,12 @@ def get_non_translation_commits(): def get_last_news_entry(): cmd = ['git', 'log', '--pretty=format:', '-p', '-1', 'NEWS'] lines = subprocess.check_output(cmd).strip().decode('utf-8').splitlines() - lines = [l[1:] for l in lines if (l and l[0] in ('+', '-')) and - (len(l) < 2 or l[1] not in ('+', '-'))] + lines = [ + line[1:] + for line in lines + if (line and line[0] in ('+', '-')) + and (len(line) < 2 or line[1] not in ('+', '-')) + ] return "\n".join(lines) @@ -199,8 +203,8 @@ def parse_news_entry(news): break return i - 1 - indent = min(space_prefix(l) for l in section) - return [l[indent:] for l in section] + indent = min(space_prefix(line) for line in section) + return [line[indent:] for line in section] return reformat(features), reformat(fixes), reformat(translators)