diff options
author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2019-11-17 13:06:37 +0100 |
---|---|---|
committer | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2019-11-25 21:50:17 +0100 |
commit | 69d511949fdf1da8309c9adab8b00ed6f80053a0 (patch) | |
tree | 313e4f8578fcd4797a8b411c31aedaf35f3ee9a7 /build_scripts/qtinfo.py | |
parent | 2914408d9017d192f254b4c7b2d298bb7b6e885e (diff) |
Improve code style with flake8
- We agreed on 100 columns time ago, so I move around a few things,
- Removing unused modules,
- Fix white-spaces tabs without being multiple of 4,
- Encourage the use of os.path.join when joining paths,
- Using .format() for string formatting,
- Remove white-spaces from default arguments,
- Adjusting white-spaces before inline comments,
- Adding extra newlines when expected,
- Adjust spaces for lines under-indented for visual indent,
- Remove white-spaces from parenthesis, and adding them for arithmetic operators.
Change-Id: I9cb28cefd114d63580b584a063c452f90d3ca885
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/qtinfo.py')
-rw-r--r-- | build_scripts/qtinfo.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/build_scripts/qtinfo.py b/build_scripts/qtinfo.py index fbe8e68ad..7680dad02 100644 --- a/build_scripts/qtinfo.py +++ b/build_scripts/qtinfo.py @@ -37,9 +37,13 @@ ## ############################################################################# -import os, sys, re, subprocess +import os +import sys +import re +import subprocess from distutils.spawn import find_executable + class QtInfo(object): def __init__(self, qmake_command=None): self.initialized = False @@ -47,7 +51,7 @@ class QtInfo(object): if qmake_command: self._qmake_command = qmake_command else: - self._qmake_command = [find_executable("qmake"),] + self._qmake_command = [find_executable("qmake"), ] # Dict to cache qmake values. self._query_dict = {} @@ -120,9 +124,9 @@ class QtInfo(object): def get_mkspecs_variables(self): return self._mkspecs_dict - def _get_qmake_output(self, args_list = []): + def _get_qmake_output(self, args_list=[]): cmd = self._qmake_command + args_list - proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, shell=False) + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=False) output = proc.communicate()[0] proc.wait() if proc.returncode != 0: |