| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
os.path.split and os.path.splitext to pathlib equivalents
adjust bldinstallercommon.calculate_relpath unit tests
Change-Id: Ieb49864ed4f804cfdff61492edfb622ce1c4a9dc
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
| |
Rewrite runner.py
Follow up patch: run_command from bld_utils.py
Requires following patch in 6cc08ee72a7eb1860bb2f982879ff71c6dda2e10
Change-Id: I984046f56d4faac8ac58f12d0dad07d7bae4b0a2
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 64b709d4b422e6d59f9e703fbc1124dd3f77d556.
Reason for revert: required dependent changes are done, we can bring this change back
Change-Id: I1692b433eda3fd2a1e5aa541785dae942cbd1665
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
| |
This reverts commit bd38f3c2897c3f82f8c10464f70ed301c618dae7.
Reason for revert: temporarily revert due to colorlog import issues
Change-Id: I8e47743780c8998580ca40de56cbe0d0b5f49504
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Remove inconsistent print function/logging module usage across scripts
-Initialize logger from logging_util.py
-Use CI friendly format in logging to stdout
-Log file format with extra debug information (script, line, process)
-Remove rainbow_logging_handler in favor of colorlog
-Remove unnecessary print/log functions from unit tests
-Remove unnecessary whitespace in logging messages
Change-Id: Ib913cf2f6a2b02e06628f94dceeeaf845191b96b
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
| |
Change-Id: I83330486be20cfecf673b8c8f395cbd1de6d1c43
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Enable --strict parameter in mypy.
Add missing type hints and resolve remaining type errors.
Change-Id: Id9547cc3351b88729930c577d4ed628780c1447b
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add comment about disabled checks in pylint hook and enable all default pylint checks except for those.
Address these miscellaneous pylint warnings:
-C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
-R1714: Consider merging these comparisons with "in" (consider-using-in)
-R1722: Consider using sys.exit() (consider-using-sys-exit)
-C0206: Consider iterating with .items() (consider-using-dict-items)
-R1710: All return statements in a function should return an expression. (inconsistent-return-statements)
-W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
-W1510: Using subprocess.run without explicitly set `check` is not recommended. (subprocess-run-check)
-W0102: Dangerous default value as argument (dangerous-default-value)
-W1508: os.getenv default type is builtins.bool. Expected str or None. (invalid-envvar-default)
-W0212: Access to a protected member of a client class (protected-access)
-W0631: Using possibly undefined loop variable (undefined-loop-variable)
-W1113: Keyword argument before variable positional arguments list in the definition of __init__ function (keyword-arg-before-vararg)
-W0201: Attribute defined outside __init__ (attribute-defined-outside-init)
-W0221: Number of parameters in overridden method differ (arguments-differ)
-C0202: Class method should have 'cls' as first argument (bad-classmethod-argument)
-W1505: Using deprecated method currentThread() (deprecated-method)
-R1707: Disallow trailing comma tuple (trailing-comma-tuple)
-W0603: Using the global statement (global-statement)
-W0602: Using global for 'OUTPUT_STATES' but no assignment is done (global-variable-not-assigned)
-C2801: Unnecessarily calls dunder method __contains__. Use in keyword.
Change-Id: Ia1c6ff3f6c328a94b40a1c0f11c83151abc91423
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
| |
Add this check and rename variables.
Change-Id: I95b933bcf0834bcb8f0c3cda92090ce1d481d398
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Enable W0621 and W0622 in pylint.
Rename variables and functions affected to avoid unintended redefinition.
Change-Id: I7ffb87c9665788e6d68e14f27c652c98248900e7
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
-Move code from module scope to main() functions where it makes sense
-Pass module variables as arguments to functions that used them
Linters will complain about naming clashes in outer scope if same name
is used in a function.
Change-Id: I1319cf1632f94907ee918e6f7593c79b0909e48b
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
-Use context manager when allocating resources
-Ignore soon to be refactored subprocess runner functions
Change-Id: I2f0c69e7dd8fd07e90694fea44313e6567a63215
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Enable following warning in pylint and use encoding="utf-8" everywhere:
W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
Change-Id: Iddb885a420b9953ec899c825293a04ed75a2aef0
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Enable following checks in pylint:
- C0209: Formatting a regular string which could be a f-string
- W1202: Use lazy % formatting in logging functions
- W1203: Use lazy % formatting in logging functions
Use f-string for string formatting where recommended and lazy % formatting in logging.
Change-Id: I14924d27e0f800c47af1ec903be4c51f24191d26
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Add isort to Pipfile, isort hook with blackformatter profile
-Fix imports in unittest hook
-Group and sort imports by their category (PEP8)
-Blank line between import groups (PEP8)
-Move all imports to toplevel (PEP8)
-Don't unnecessarily append to sys.path (PEP8)
-Import only required functions (this also helps reduce line length)
-Update deprecated imports such as builtins.WindowsError, ConfigParser.readfp
-Remove Python 2, cyclic and unused imports
-Fix platform dependent imports and remove unnecessaty try-excepts
-Remove unnecessary comments before imports, use in-line comments when needed
-Rename conflicting functions in imports, variables as absolute imports are recommended (PEP8)
Change-Id: I5ac7a3499ea47a6bdc9a9a2b5211841f65c011ea
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable flake8 indentation related checks and fix indentation:
- E123 Closing bracket does not match indentation of opening bracket's line
- E126 Continuation line over-indented for hanging indent
- E128 Continuation line under-indented for visual indent
- E125 Continuation line with same indent as next logical line
- E117 Over-indented
- E124 Closing bracket does not match visual indentation
- E127 Continuation line over-indented for visual indent
- E111 Indentation is not a multiple of four
- E121 Continuation line under-indented for hanging indent
Change-Id: I2f25ed06d229b8fdaf94d69fa080dc1178ff3a2d
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix whitespace, Enable following checks in flake8:
- E225 Missing whitespace around operator (E225)
- E226 Missing whitespace around arithmetic operator (E226)
- E231 Missing whitespace after ',', ';', or ':' (E231)
- E221 Multiple spaces before operator (E221)
- E201 Whitespace after '(' (E201)
- E252 Missing whitespace around parameter equals
- E251 Unexpected spaces around keyword / parameter equals
- E202 Whitespace before ')' (E202)
- E222 Multiple spaces after operator (E222)
- E211 Whitespace before '(' (E211)
Change-Id: Ib14a4a83dbc06cdfac511eb09912d7b9232df7e6
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct the amount of lines in function and class definitions as well as
at the end of the file. Enable following flake8 checks:
- E301 Expected 1 blank line, found 0
- E302 Expected 2 blank lines, found 0
- E303 Too many blank lines
- E305 Expected 2 blank lines after end of function or class
- E306 Expected 1 blank line before a nested definition
- W391 Blank line at end of file
Change-Id: Ia9bb511ded47df1f43bfffa4be00abfdbda60cae
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable following checks in flake8 hook, and fix the discovered errors:
-F821 Undefined name
-W605 Invalid escape sequence
-E703 Statement ends with a semicolon
-E999 SyntaxError
-F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
-E711 comparison to None should be 'if cond is not None:'
Change-Id: I21e2d84463c4f8560a460f05e6055c61e2a02908
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable following checks in flake8, and fix the resulting errors:
-F401 Module imported but unused
-F841 Local variable name is assigned to but never used
-F811 redefinition of unused module
-F541 (f-string is missing placeholders)
-F523 .format(...) unused positional arguments
Change-Id: Iba0e9f0148054d86b39b31202aba81a7f5c03a93
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Update year and license header
-Update header formatting to match others in send_header_diff_kmail.py
-Change "## " to "# " in license headers to make them PEP8 compliant.
-Reference: https://peps.python.org/pep-0008/#block-comments
-flake8 rule descriptions and codes:
-Block comment should start with '# ' (E265)
-Too many leading '#' for block comment (E266)
Change-Id: Ife039694462e9908bc22ab253ba3202c7245a7a3
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Moving this function since runner.py already has similar functionality
so it makes more sense to have it there.
Change-Id: Iedd4a5ba050a917258f303c21ae0edf4c30b5915
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current way of using bldinstallercommon is cumbersome.
The bldinstallercommon "requires" initialization which in turn sets up
global variables for current platform.
Put the conviniency functions:
is_windows()
is_macos()
is_linux()
into bld_utils.py which should serve as a place where remainder of the
utilities can go. The bldinstallercommon needs to be split into separate
files/modules per functionality in the long term.
Remove also Solaris support and IFW cross-compilation support which
are no longer needed.
Change-Id: Iecafac7e658ca05223b073ad551007fa7187fb0b
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
nasm (http://sourceforge.net/projects/nasm/files/), nmake and 7z
need to be in the PATH.
So far the script handles Windows builds, only.
Change-Id: I296c1b746150930e2302908ed3315a5f2610602a
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|