From 3ba8be5bf7579346f82141d266eb7a6b0cca167e Mon Sep 17 00:00:00 2001 From: A_D Date: Mon, 26 Oct 2020 11:22:17 +0200 Subject: [PATCH] Removed unneeded list comprehensions --- l10n.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/l10n.py b/l10n.py index c1ad0552..ecefd24e 100755 --- a/l10n.py +++ b/l10n.py @@ -140,12 +140,12 @@ class Translations(object): def available(self): path = self.respath() if getattr(sys, 'frozen', False) and platform == 'darwin': - available = set([ + available = { x[:-len('.lproj')] for x in os.listdir(path) if x.endswith('.lproj') and isfile(join(x, 'Localizable.strings')) - ]) + } else: - available = set([x[:-len('.strings')] for x in os.listdir(path) if x.endswith('.strings')]) + available = {x[:-len('.strings')] for x in os.listdir(path) if x.endswith('.strings')} return available # Available language names by code @@ -279,10 +279,11 @@ if __name__ == "__main__": import re regexp = re.compile(r'''_\([ur]?(['"])(((?