Skip to content

Commit c70432d

Browse files
authored
Merge pull request #2191 from AndreMiras/feature/linter
🐛 Fixes flake8 errors post update
2 parents eeed13c + 2eb0ddf commit c70432d

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

pythonforandroid/archs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def get_env(self, with_flags_in_cc=True):
145145
+ " ".join(
146146
[
147147
"-L'"
148-
+ l.replace("'", "'\"'\"'")
148+
+ link_path.replace("'", "'\"'\"'")
149149
+ "'" # no shlex.quote in py2
150-
for l in self.extra_global_link_paths
150+
for link_path in self.extra_global_link_paths
151151
]
152152
)
153153
+ ' ' + ' '.join(self.common_ldflags).format(

pythonforandroid/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def find_order(graph):
130130
'''
131131
while graph:
132132
# Find all items without a parent
133-
leftmost = [l for l, s in graph.items() if not s]
133+
leftmost = [name for name, dep in graph.items() if not dep]
134134
if not leftmost:
135135
raise ValueError('Dependency cycle detected! %s' % graph)
136136
# If there is more than one, sort them for predictable order

pythonforandroid/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ def printtail(out, name, forecolor, tail_n=0,
199199
re_filter_in=None, re_filter_out=None):
200200
lines = out.splitlines()
201201
if re_filter_in is not None:
202-
lines = [l for l in lines if re_filter_in.search(l)]
202+
lines = [line for line in lines if re_filter_in.search(line)]
203203
if re_filter_out is not None:
204-
lines = [l for l in lines if not re_filter_out.search(l)]
204+
lines = [line for line in lines if not re_filter_out.search(line)]
205205
if tail_n == 0 or len(lines) <= tail_n:
206206
info('{}:\n{}\t{}{}'.format(
207207
name, forecolor, '\t\n'.join(lines), Out_Fore.RESET))

pythonforandroid/pythonpackage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def get_package_dependencies(package,
688688
new_reqs = set()
689689
if verbose:
690690
print("get_package_dependencies: resolving dependency "
691-
"to package name: ".format(package_dep))
691+
f"to package name: {package_dep}")
692692
package = get_package_name(package_dep)
693693
if package.lower() in packages_processed:
694694
continue

pythonforandroid/recipes/android/src/android/_ctypes_library_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def find_library(name):
5353
lib_search_dirs.insert(0, lib_dir_2)
5454

5555
# Now scan the lib dirs:
56-
for lib_dir in [l for l in lib_search_dirs if os.path.exists(l)]:
56+
for lib_dir in [ldir for ldir in lib_search_dirs if os.path.exists(ldir)]:
5757
filelist = [
5858
f for f in os.listdir(lib_dir)
5959
if does_libname_match_filename(name, f)

pythonforandroid/recipes/reportlab/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def prebuild_arch(self, arch):
2222
font_dir = os.path.join(recipe_dir,
2323
"src", "reportlab", "fonts")
2424
if os.path.exists(font_dir):
25-
for l in os.listdir(font_dir):
26-
if l.lower().startswith('darkgarden'):
27-
os.remove(os.path.join(font_dir, l))
25+
for file in os.listdir(font_dir):
26+
if file.lower().startswith('darkgarden'):
27+
os.remove(os.path.join(font_dir, file))
2828

2929
# Apply patches:
3030
self.apply_patch('patches/fix-setup.patch', arch.arch)

pythonforandroid/toolchain.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ def build_dist_from_args(ctx, dist, args):
216216
.format(join(ctx.dist_dir, ctx.distribution.dist_dir)))
217217

218218

219-
def split_argument_list(l):
220-
if not len(l):
219+
def split_argument_list(arg_list):
220+
if not len(arg_list):
221221
return []
222-
return re.split(r'[ ,]+', l)
222+
return re.split(r'[ ,]+', arg_list)
223223

224224

225225
class NoAbbrevParser(argparse.ArgumentParser):
@@ -1144,7 +1144,7 @@ def distributions(self, _args):
11441144

11451145
if dists:
11461146
print('{Style.BRIGHT}Distributions currently installed are:'
1147-
'{Style.RESET_ALL}'.format(Style=Out_Style, Fore=Out_Fore))
1147+
'{Style.RESET_ALL}'.format(Style=Out_Style))
11481148
pretty_log_dists(dists, print)
11491149
else:
11501150
print('{Style.BRIGHT}There are no dists currently built.'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy