Skip to content

Commit

Permalink
More lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiw committed Dec 16, 2023
1 parent cf55d36 commit 9675984
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/meld
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
12 changes: 8 additions & 4 deletions maint
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 9675984

Please sign in to comment.