Skip to content

Commit b1f7033

Browse files
authored
Merge pull request #1378 from AndreMiras/feature/linter_fixes
Linter fixes E115, E201, E221, E251, E271, E703
2 parents 830cae4 + 87c2fb2 commit b1f7033

File tree

17 files changed

+28
-32
lines changed

17 files changed

+28
-32
lines changed

pythonforandroid/bootstraps/pygame/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def run_distribute(self):
5454
if not exists('python-install'):
5555
shprint(sh.cp, '-a', self.ctx.get_python_install_dir(), './python-install')
5656

57-
self.distribute_libs(arch, [join(self.build_dir, 'libs', arch.arch), self.ctx.get_libs_dir(arch.arch)]);
57+
self.distribute_libs(arch, [join(self.build_dir, 'libs', arch.arch), self.ctx.get_libs_dir(arch.arch)])
5858
self.distribute_aars(arch)
5959
self.distribute_javaclasses(self.ctx.javaclass_dir)
6060

pythonforandroid/bootstraps/pygame/build/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ def select(fn):
183183
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
184184
dirs = []
185185
for fn, afn in files:
186-
# print('%s: %s' % (tfn, fn))
187186
dn = dirname(afn)
188187
if dn not in dirs:
189188
# create every dirs first if not exist yet

pythonforandroid/bootstraps/pygame/build/buildlib/argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def _get_action_name(argument):
705705
if argument is None:
706706
return None
707707
elif argument.option_strings:
708-
return '/'.join(argument.option_strings)
708+
return '/'.join(argument.option_strings)
709709
elif argument.metavar not in (None, SUPPRESS):
710710
return argument.metavar
711711
elif argument.dest not in (None, SUPPRESS):

pythonforandroid/bootstraps/pygame/build/tools/biglink

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import os
55
import sys
66
import subprocess
77

8-
sofiles = [ ]
8+
sofiles = []
99

1010
for directory in sys.argv[2:]:
1111

@@ -20,7 +20,7 @@ for directory in sys.argv[2:]:
2020
sofiles.append(fn[:-2])
2121

2222
# The raw argument list.
23-
args = [ ]
23+
args = []
2424

2525
for fn in sofiles:
2626
afn = fn + ".o"
@@ -31,7 +31,7 @@ for fn in sofiles:
3131
data = fd.read()
3232
args.extend(data.split(" "))
3333

34-
unique_args = [ ]
34+
unique_args = []
3535
while args:
3636
a = args.pop()
3737
if a in ('-L', ):

pythonforandroid/bootstraps/pygame/build/tools/biglink-jb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ blacklist_libs = (
2525
)
2626

2727
found_libs = []
28-
sofiles = [ ]
28+
sofiles = []
2929

3030
for directory in sys.argv[2:]:
3131

pythonforandroid/bootstraps/pygame/build/tools/liblink

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import subprocess
66
from os import environ
77
from os.path import basename, join
88

9-
libs = [ ]
10-
objects = [ ]
9+
libs = []
10+
objects = []
1111
output = None
1212

1313

pythonforandroid/bootstraps/pygame/build/tools/liblink-jb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import subprocess
66
from os import environ
77
from os.path import basename, join
88

9-
libs = [ ]
10-
libdirs = [ ]
9+
libs = []
10+
libdirs = []
1111
output = None
1212

1313

pythonforandroid/bootstraps/sdl2/build/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def select(fn):
187187
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
188188
dirs = []
189189
for fn, afn in files:
190-
# print('%s: %s' % (tfn, fn))
191190
dn = dirname(afn)
192191
if dn not in dirs:
193192
# create every dirs first if not exist yet

pythonforandroid/bootstraps/service_only/build/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ def select(fn):
178178
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
179179
dirs = []
180180
for fn, afn in files:
181-
# print('%s: %s' % (tfn, fn))
182181
dn = dirname(afn)
183182
if dn not in dirs:
184183
# create every dirs first if not exist yet

pythonforandroid/bootstraps/webview/build/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def select(fn):
179179
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
180180
dirs = []
181181
for fn, afn in files:
182-
# print('%s: %s' % (tfn, fn))
183182
dn = dirname(afn)
184183
if dn not in dirs:
185184
# create every dirs first if not exist yet

pythonforandroid/recipes/android/src/android/mixer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def fadeout(time):
6161

6262

6363
# A map from channel number to Channel object.
64-
channels = { }
64+
channels = {}
6565

6666

6767
def set_num_channels(count):
@@ -80,7 +80,7 @@ def set_reserved(count):
8080

8181
def find_channel(force=False):
8282

83-
busy = [ ]
83+
busy = []
8484

8585
for i in range(reserved_channels, num_channels):
8686
c = Channel(i)
@@ -195,7 +195,7 @@ def Channel(n):
195195

196196

197197
sound_serial = 0
198-
sounds = { }
198+
sounds = {}
199199

200200

201201
class Sound(object):

pythonforandroid/recipes/audiostream/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class AudiostreamRecipe(CythonRecipe):
7-
version = 'master'
7+
version = 'master'
88
url = 'https://github.com/kivy/audiostream/archive/{version}.zip'
99
name = 'audiostream'
1010
depends = ['python2', ('sdl', 'sdl2'), 'pyjnius']
@@ -21,9 +21,9 @@ def get_recipe_env(self, arch):
2121
env['SDL2_INCLUDE_DIR'] = '/home/kivy/.buildozer/android/platform/android-ndk-r9c/sources/android/support/include'
2222

2323
env['CFLAGS'] += ' -I{jni_path}/{sdl_include}/include -I{jni_path}/{sdl_mixer_include}'.format(
24-
jni_path = join(self.ctx.bootstrap.build_dir, 'jni'),
25-
sdl_include = sdl_include,
26-
sdl_mixer_include = sdl_mixer_include)
24+
jni_path=join(self.ctx.bootstrap.build_dir, 'jni'),
25+
sdl_include=sdl_include,
26+
sdl_mixer_include=sdl_mixer_include)
2727
return env
2828

2929

pythonforandroid/recipes/ifaddrs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def should_build(self, arch):
2626
def prebuild_arch(self, arch):
2727
"""Make the build and target directories"""
2828
path = self.get_build_dir(arch.arch)
29-
if not exists(path):
29+
if not exists(path):
3030
info("creating {}".format(path))
3131
shprint(sh.mkdir, '-p', path)
3232

@@ -37,7 +37,7 @@ def build_arch(self, arch):
3737
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Lib'),
3838
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Include'),
3939
):
40-
if not exists(path):
40+
if not exists(path):
4141
info("creating {}".format(path))
4242
shprint(sh.mkdir, '-p', path)
4343
cli = env['CC'].split()

pythonforandroid/recipes/libglob/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def should_build(self, arch):
3131
def prebuild_arch(self, arch):
3232
"""Make the build and target directories"""
3333
path = self.get_build_dir(arch.arch)
34-
if not exists(path):
34+
if not exists(path):
3535
info("creating {}".format(path))
3636
shprint(sh.mkdir, '-p', path)
3737

@@ -42,7 +42,7 @@ def build_arch(self, arch):
4242
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Lib'),
4343
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Include'),
4444
):
45-
if not exists(path):
45+
if not exists(path):
4646
info("creating {}".format(path))
4747
shprint(sh.mkdir, '-p', path)
4848
cli = env['CC'].split()

pythonforandroid/recipes/libtorrent/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class LibtorrentRecipe(Recipe):
1616
patches = ['disable-so-version.patch', 'use-soname-python.patch', 'setup-lib-name.patch']
1717

1818
def should_build(self, arch):
19-
return not ( self.has_libs(arch, 'libboost_python.so', 'libboost_system.so', 'libtorrent_rasterbar.so')
19+
return not (self.has_libs(arch, 'libboost_python.so', 'libboost_system.so', 'libtorrent_rasterbar.so')
2020
and self.ctx.has_package('libtorrent', arch.arch) )
2121

2222
def prebuild_arch(self, arch):

pythonforandroid/tools/biglink

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import os
55
import sys
66
import subprocess
77

8-
sofiles = [ ]
8+
sofiles = []
99

1010
for directory in sys.argv[2:]:
1111

@@ -20,7 +20,7 @@ for directory in sys.argv[2:]:
2020
sofiles.append(fn[:-2])
2121

2222
# The raw argument list.
23-
args = [ ]
23+
args = []
2424

2525
for fn in sofiles:
2626
afn = fn + ".o"
@@ -31,7 +31,7 @@ for fn in sofiles:
3131
data = fd.read()
3232
args.extend(data.split(" "))
3333

34-
unique_args = [ ]
34+
unique_args = []
3535
while args:
3636
a = args.pop()
3737
if a in ('-L', ):

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ commands = flake8 pythonforandroid/
99

1010
[flake8]
1111
ignore =
12-
E111, E114, E115, E116, E202, E121, E123, E124, E225, E126, E127, E128,
13-
E129, E201, E221, E226, E241, E251, E265, E266, E271,
14-
E401, E402, E501, E502, E703, E722, E741, F403,
12+
E111, E114, E116, E202, E121, E123, E124, E225, E126, E127, E128,
13+
E129, E226, E241, E265, E266,
14+
E401, E402, E501, E502, E722, E741, F403,
1515
F812, F841, F811, W292, W503

0 commit comments

Comments
 (0)