Skip to content

Fixes linter F401 (unused imports) #1284

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
May 22, 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
1 change: 0 additions & 1 deletion pythonforandroid/bdistapk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import print_function
from setuptools import Command
from pythonforandroid import toolchain

import sys
from os.path import realpath, join, exists, dirname, curdir, basename, split
Expand Down
6 changes: 3 additions & 3 deletions pythonforandroid/bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from os.path import (join, dirname, isdir, splitext, basename, realpath)
from os import listdir, mkdir
from os.path import (join, dirname, isdir, splitext, basename)
from os import listdir
import sh
import glob
import json
import importlib

from pythonforandroid.logger import (warning, shprint, info, logger,
debug, error)
debug)
from pythonforandroid.util import (current_directory, ensure_dir,
temp_directory, which)
from pythonforandroid.recipe import Recipe
Expand Down
4 changes: 0 additions & 4 deletions pythonforandroid/bootstraps/empty/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from pythonforandroid.toolchain import Bootstrap
from os.path import join, exists
from os import walk
import glob
import sh


class EmptyBootstrap(Bootstrap):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/bootstraps/pygame/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
from pythonforandroid.toolchain import Bootstrap, current_directory, info, info_main, shprint
from os.path import join, exists
from os import walk
import glob
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/bootstraps/service_only/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from os import walk
from os.path import join, exists, curdir, abspath
import sh
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
from pythonforandroid.toolchain import Bootstrap, current_directory, info, info_main, shprint


class ServiceOnlyBootstrap(Bootstrap):
Expand Down
2 changes: 0 additions & 2 deletions pythonforandroid/bootstraps/service_only/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
from os import makedirs
import os
import tarfile
import time
import subprocess
import shutil
from zipfile import ZipFile
import sys
import re
import shlex

from fnmatch import fnmatch
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/bootstraps/webview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
from pythonforandroid.toolchain import Bootstrap, current_directory, info, info_main, shprint
from os.path import join, exists, curdir, abspath
from os import walk
import glob
Expand Down
9 changes: 4 additions & 5 deletions pythonforandroid/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from os.path import (join, realpath, dirname, expanduser, exists,
split, isdir)
from os import environ, listdir
from os import environ
import os
import glob
import sys
Expand All @@ -11,9 +11,8 @@

from pythonforandroid.util import (ensure_dir, current_directory)
from pythonforandroid.logger import (info, warning, error, info_notify,
Err_Fore, Err_Style, info_main,
shprint)
from pythonforandroid.archs import ArchARM, ArchARMv7_a, Archx86, Archx86_64, ArchAarch_64
Err_Fore, info_main, shprint)
from pythonforandroid.archs import ArchARM, ArchARMv7_a, ArchAarch_64, Archx86
from pythonforandroid.recipe import Recipe

DEFAULT_ANDROID_API = 15
Expand Down Expand Up @@ -382,7 +381,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,

toolchain_versions = []
toolchain_path = join(self.ndk_dir, 'toolchains')
if os.path.isdir(toolchain_path):
if isdir(toolchain_path):
toolchain_contents = glob.glob('{}/{}-*'.format(toolchain_path,
toolchain_prefix))
toolchain_versions = [split(path)[-1][len(toolchain_prefix) + 1:]
Expand Down
4 changes: 1 addition & 3 deletions pythonforandroid/recipe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from os.path import join, dirname, isdir, exists, isfile, split, realpath, basename
from os.path import basename, dirname, exists, isdir, isfile, join, realpath
import importlib
import zipfile
import glob
from shutil import rmtree
from six import PY2, with_metaclass
Expand All @@ -21,7 +20,6 @@
from pythonforandroid.util import (urlretrieve, current_directory, ensure_dir)

# this import is necessary to keep imp.load_source from complaining :)
import pythonforandroid.recipes


if PY2:
Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/recipes/android/src/android/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
'''

# legacy import
from android._android import *
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/android/src/android/activity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from jnius import PythonJavaClass, java_method, autoclass, cast
from jnius import PythonJavaClass, autoclass, java_method
from android.config import JAVA_NAMESPACE, JNI_NAMESPACE

_activity = autoclass(JAVA_NAMESPACE + '.PythonActivity').mActivity
Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/recipes/android/src/android/billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@

'''

from android._android_billing import *
5 changes: 3 additions & 2 deletions pythonforandroid/recipes/apsw/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from pythonforandroid.toolchain import PythonRecipe, shprint, shutil, current_directory
from os.path import join, exists
from pythonforandroid.recipe import PythonRecipe
from pythonforandroid.toolchain import current_directory, shprint
import sh


class ApswRecipe(PythonRecipe):
version = '3.15.0-r1'
url = 'https://github.com/rogerbinns/apsw/archive/{version}.tar.gz'
Expand Down
6 changes: 2 additions & 4 deletions pythonforandroid/recipes/audiostream/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, info
import sh
import glob
from os.path import join, exists
from pythonforandroid.recipe import CythonRecipe
from os.path import join


class AudiostreamRecipe(CythonRecipe):
Expand Down
3 changes: 1 addition & 2 deletions pythonforandroid/recipes/cdecimal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

from pythonforandroid.toolchain import CompiledComponentsPythonRecipe
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
from pythonforandroid.patching import is_darwin


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/cherrypy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe

class CherryPyRecipe(PythonRecipe):
version = '5.1.0'
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/coverage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe


class CoverageRecipe(PythonRecipe):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/cryptography/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
from os.path import dirname, join
from os.path import join

class CryptographyRecipe(CompiledComponentsPythonRecipe):
name = 'cryptography'
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/cymunk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import CythonRecipe
from pythonforandroid.recipe import CythonRecipe


class CymunkRecipe(CythonRecipe):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/decorator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe

class DecoratorPyRecipe(PythonRecipe):
version = '4.0.9'
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/enum34/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe

class Enum34Recipe(PythonRecipe):
version = '1.1.3'
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/feedparser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe

class FeedparserPyRecipe(PythonRecipe):
version = '5.2.1'
Expand Down
6 changes: 1 addition & 5 deletions pythonforandroid/recipes/ffmpeg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
from pythonforandroid.toolchain import Recipe, shprint, current_directory, ArchARM
from pythonforandroid.toolchain import Recipe, current_directory, shprint
from os.path import exists, join, realpath
from os import uname
import glob
import sh
import os
import shutil


class FFMpegRecipe(Recipe):
Expand Down
9 changes: 3 additions & 6 deletions pythonforandroid/recipes/ffpyplayer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from pythonforandroid.toolchain import Recipe, CythonRecipe, shprint, current_directory, ArchARM
from os.path import exists, join, realpath
from os import uname
import glob
import sh
import os
from pythonforandroid.recipe import CythonRecipe
from pythonforandroid.toolchain import Recipe
from os.path import join


class FFPyPlayerRecipe(CythonRecipe):
Expand Down
3 changes: 1 addition & 2 deletions pythonforandroid/recipes/flask/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

from pythonforandroid.toolchain import PythonRecipe, shprint
import sh
from pythonforandroid.recipe import PythonRecipe


class FlaskRecipe(PythonRecipe):
Expand Down
7 changes: 2 additions & 5 deletions pythonforandroid/recipes/fontconfig/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

from pythonforandroid.toolchain import BootstrapNDKRecipe, shprint, current_directory, info_main
from os.path import exists, join
from pythonforandroid.recipe import BootstrapNDKRecipe
from pythonforandroid.toolchain import current_directory, shprint
import sh




class FontconfigRecipe(BootstrapNDKRecipe):
version = "really_old"
url = 'https://github.com/vault/fontconfig/archive/androidbuild.zip'
Expand Down
4 changes: 1 addition & 3 deletions pythonforandroid/recipes/freetype/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

from pythonforandroid.toolchain import Recipe, shprint, current_directory, ArchARM
from pythonforandroid.toolchain import Recipe, current_directory, shprint
from os.path import exists, join, realpath
from os import uname
import glob
import sh

class FreetypeRecipe(Recipe):
Expand Down
4 changes: 2 additions & 2 deletions pythonforandroid/recipes/genericndkbuild/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pythonforandroid.toolchain import BootstrapNDKRecipe, shprint, current_directory, info
from os.path import exists, join
from pythonforandroid.recipe import BootstrapNDKRecipe
from pythonforandroid.toolchain import current_directory, shprint
import sh


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/gevent-websocket/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe


class GeventWebsocketRecipe(PythonRecipe):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/gevent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from pythonforandroid.toolchain import CompiledComponentsPythonRecipe
from pythonforandroid.recipe import CompiledComponentsPythonRecipe


class GeventRecipe(CompiledComponentsPythonRecipe):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/greenlet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe


class GreenletRecipe(PythonRecipe):
Expand Down
6 changes: 2 additions & 4 deletions pythonforandroid/recipes/harfbuzz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

from pythonforandroid.toolchain import Recipe, shprint, current_directory, ArchARM
from os.path import exists, join, realpath
from os import uname
import glob
from pythonforandroid.toolchain import Recipe, current_directory, shprint
from os.path import exists, join
import sh


Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/recipes/hostpython2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

from pythonforandroid.toolchain import Recipe, shprint, current_directory, info, warning
from os.path import join, exists
from os import chdir
import os
import sh

Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/icu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from os.path import join, isdir
from pythonforandroid.recipe import NDKRecipe
from pythonforandroid.toolchain import shprint, info
from pythonforandroid.toolchain import shprint
from pythonforandroid.util import current_directory, ensure_dir


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 @@ -3,9 +3,9 @@
from os.path import join, exists
import sh
from pythonforandroid.logger import info, shprint
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
from pythonforandroid.toolchain import current_directory

from pythonforandroid.toolchain import (CompiledComponentsPythonRecipe,
current_directory)

class IFAddrRecipe(CompiledComponentsPythonRecipe):
version = 'master'
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/jedi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import PythonRecipe


class JediRecipe(PythonRecipe):
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/kivent_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import CythonRecipe
from pythonforandroid.recipe import CythonRecipe
from os.path import join


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/kivent_cymunk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import CythonRecipe
from pythonforandroid.recipe import CythonRecipe
from os.path import join


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/kivent_particles/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import CythonRecipe
from pythonforandroid.recipe import CythonRecipe
from os.path import join


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/kivent_polygen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pythonforandroid.toolchain import CythonRecipe
from pythonforandroid.recipe import CythonRecipe
from os.path import join


Expand Down
4 changes: 2 additions & 2 deletions pythonforandroid/recipes/kivy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchARM
from pythonforandroid.recipe import CythonRecipe
from pythonforandroid.toolchain import current_directory, shprint
from os.path import exists, join, basename
import sh
import glob
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/leveldb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory
from os.path import join, exists
from os.path import join
import sh

class LevelDBRecipe(Recipe):
Expand Down
3 changes: 1 addition & 2 deletions pythonforandroid/recipes/libcurl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sh
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory
from pythonforandroid.util import ensure_dir
from os.path import exists, join, abspath
from os.path import exists, join
from multiprocessing import cpu_count


Expand Down
3 changes: 1 addition & 2 deletions pythonforandroid/recipes/libgeos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory
from pythonforandroid.util import ensure_dir
from os.path import exists, join, abspath
from os.path import exists, join
import sh
from multiprocessing import cpu_count

Expand Down
Loading