fix flake8

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura
2019-03-06 21:59:43 +09:00
parent 5893dc6ddd
commit d9a9fa4ec1
5 changed files with 17 additions and 14 deletions

View File

@@ -29,7 +29,8 @@ from aqt.installer import QtInstaller
def main():
parser = argparse.ArgumentParser(description='Install Qt SDK.', formatter_class=RawTextHelpFormatter, add_help=True)
parser = argparse.ArgumentParser(description='Install Qt SDK.',
formatter_class=RawTextHelpFormatter, add_help=True)
parser.add_argument("qt_version", help="Qt version in the format of \"5.X.Y\"")
parser.add_argument('host', choices=['linux', 'mac', 'windows'], help="host os name")
parser.add_argument('target', choices=['desktop', 'android', 'ios'], help="target sdk")
@@ -65,4 +66,4 @@ def main():
if __name__ == "__main__":
sys.exit(main())
sys.exit(main())

View File

@@ -94,4 +94,3 @@ class QtArchives:
def get_archives(self):
return self.archives

View File

@@ -47,7 +47,7 @@ class QtInstaller:
urllib.request.urlretrieve(url, archive)
sys.stdout.write("\033[K")
print("-Extracting {}...".format(archive))
if platform.system() is 'Windows':
if platform.system() == 'Windows':
subprocess.run([r'C:\Program Files\7-Zip\7z.exe', 'x', '-aoa', '-y', archive])
else:
subprocess.run([r'7z', 'x', '-aoa', '-y', archive])
@@ -88,6 +88,5 @@ class QtInstaller:
if 'QT_EDITION' in line:
line = 'QT_EDITION = OpenSource'
f.write(line)
except:
except IOError:
pass

2
setup.cfg Normal file
View File

@@ -0,0 +1,2 @@
[flake8]
max-line-length = 125

View File

@@ -5,18 +5,20 @@ import os
from setuptools import setup
def readme():
with io.open(os.path.join(os.path.dirname(__file__),'README.rst'), mode="r", encoding="UTF-8") as f:
with io.open(os.path.join(os.path.dirname(__file__), 'README.rst'), mode="r", encoding="UTF-8") as f:
return f.read()
setup(name='aqtinstall',
version='0.2.0',
description='Another Qt installer',
setup(name = 'aqtinstall',
version = '0.2.0',
description = 'Another Qt installer',
url='http://github.com/miurahr/qli-installer',
license='MIT',
license ='MIT',
long_description=readme(),
author='Hioshi Miura',
author_email='miurahr@linux.com',
author ='Hioshi Miura',
author_email ='miurahr@linux.com',
packages = ["aqt"],
scripts = ["aqtinst"]
)
)