Skip to content

Linter fixes E115, E201, E221, E251, E271, E703 #1378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pythonforandroid/bootstraps/pygame/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def run_distribute(self):
if not exists('python-install'):
shprint(sh.cp, '-a', self.ctx.get_python_install_dir(), './python-install')

self.distribute_libs(arch, [join(self.build_dir, 'libs', arch.arch), self.ctx.get_libs_dir(arch.arch)]);
self.distribute_libs(arch, [join(self.build_dir, 'libs', arch.arch), self.ctx.get_libs_dir(arch.arch)])
self.distribute_aars(arch)
self.distribute_javaclasses(self.ctx.javaclass_dir)

Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/bootstraps/pygame/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def select(fn):
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
dirs = []
for fn, afn in files:
# print('%s: %s' % (tfn, fn))
dn = dirname(afn)
if dn not in dirs:
# create every dirs first if not exist yet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def _get_action_name(argument):
if argument is None:
return None
elif argument.option_strings:
return '/'.join(argument.option_strings)
return '/'.join(argument.option_strings)
elif argument.metavar not in (None, SUPPRESS):
return argument.metavar
elif argument.dest not in (None, SUPPRESS):
Expand Down
6 changes: 3 additions & 3 deletions pythonforandroid/bootstraps/pygame/build/tools/biglink
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import os
import sys
import subprocess

sofiles = [ ]
sofiles = []

for directory in sys.argv[2:]:

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

# The raw argument list.
args = [ ]
args = []

for fn in sofiles:
afn = fn + ".o"
Expand All @@ -31,7 +31,7 @@ for fn in sofiles:
data = fd.read()
args.extend(data.split(" "))

unique_args = [ ]
unique_args = []
while args:
a = args.pop()
if a in ('-L', ):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/bootstraps/pygame/build/tools/biglink-jb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ blacklist_libs = (
)

found_libs = []
sofiles = [ ]
sofiles = []

for directory in sys.argv[2:]:

Expand Down
4 changes: 2 additions & 2 deletions pythonforandroid/bootstraps/pygame/build/tools/liblink
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import subprocess
from os import environ
from os.path import basename, join

libs = [ ]
objects = [ ]
libs = []
objects = []
output = None


Expand Down
4 changes: 2 additions & 2 deletions pythonforandroid/bootstraps/pygame/build/tools/liblink-jb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import subprocess
from os import environ
from os.path import basename, join

libs = [ ]
libdirs = [ ]
libs = []
libdirs = []
output = None


Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/bootstraps/sdl2/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def select(fn):
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
dirs = []
for fn, afn in files:
# print('%s: %s' % (tfn, fn))
dn = dirname(afn)
if dn not in dirs:
# create every dirs first if not exist yet
Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/bootstraps/service_only/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ def select(fn):
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
dirs = []
for fn, afn in files:
# print('%s: %s' % (tfn, fn))
dn = dirname(afn)
if dn not in dirs:
# create every dirs first if not exist yet
Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/bootstraps/webview/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def select(fn):
tf = tarfile.open(tfn, 'w:gz', format=tarfile.USTAR_FORMAT)
dirs = []
for fn, afn in files:
# print('%s: %s' % (tfn, fn))
dn = dirname(afn)
if dn not in dirs:
# create every dirs first if not exist yet
Expand Down
6 changes: 3 additions & 3 deletions pythonforandroid/recipes/android/src/android/mixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def fadeout(time):


# A map from channel number to Channel object.
channels = { }
channels = {}


def set_num_channels(count):
Expand All @@ -80,7 +80,7 @@ def set_reserved(count):

def find_channel(force=False):

busy = [ ]
busy = []

for i in range(reserved_channels, num_channels):
c = Channel(i)
Expand Down Expand Up @@ -195,7 +195,7 @@ def Channel(n):


sound_serial = 0
sounds = { }
sounds = {}


class Sound(object):
Expand Down
8 changes: 4 additions & 4 deletions pythonforandroid/recipes/audiostream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


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

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


Expand Down
4 changes: 2 additions & 2 deletions pythonforandroid/recipes/ifaddrs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def should_build(self, arch):
def prebuild_arch(self, arch):
"""Make the build and target directories"""
path = self.get_build_dir(arch.arch)
if not exists(path):
if not exists(path):
info("creating {}".format(path))
shprint(sh.mkdir, '-p', path)

Expand All @@ -37,7 +37,7 @@ def build_arch(self, arch):
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Lib'),
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Include'),
):
if not exists(path):
if not exists(path):
info("creating {}".format(path))
shprint(sh.mkdir, '-p', path)
cli = env['CC'].split()
Expand Down
4 changes: 2 additions & 2 deletions pythonforandroid/recipes/libglob/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def should_build(self, arch):
def prebuild_arch(self, arch):
"""Make the build and target directories"""
path = self.get_build_dir(arch.arch)
if not exists(path):
if not exists(path):
info("creating {}".format(path))
shprint(sh.mkdir, '-p', path)

Expand All @@ -42,7 +42,7 @@ def build_arch(self, arch):
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Lib'),
join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Include'),
):
if not exists(path):
if not exists(path):
info("creating {}".format(path))
shprint(sh.mkdir, '-p', path)
cli = env['CC'].split()
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/libtorrent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class LibtorrentRecipe(Recipe):
patches = ['disable-so-version.patch', 'use-soname-python.patch', 'setup-lib-name.patch']

def should_build(self, arch):
return not ( self.has_libs(arch, 'libboost_python.so', 'libboost_system.so', 'libtorrent_rasterbar.so')
return not (self.has_libs(arch, 'libboost_python.so', 'libboost_system.so', 'libtorrent_rasterbar.so')
and self.ctx.has_package('libtorrent', arch.arch) )

def prebuild_arch(self, arch):
Expand Down
6 changes: 3 additions & 3 deletions pythonforandroid/tools/biglink
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import os
import sys
import subprocess

sofiles = [ ]
sofiles = []

for directory in sys.argv[2:]:

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

# The raw argument list.
args = [ ]
args = []

for fn in sofiles:
afn = fn + ".o"
Expand All @@ -31,7 +31,7 @@ for fn in sofiles:
data = fd.read()
args.extend(data.split(" "))

unique_args = [ ]
unique_args = []
while args:
a = args.pop()
if a in ('-L', ):
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ commands = flake8 pythonforandroid/

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