aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/libclang_training/run_batch_files.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix flake8, isort, pylint linter warnings when running git hooksv5.15.13-lts-packagingPatrik Teivonen2023-03-011-3/+6
| | | | | Change-Id: Id4ca869c36b68336429b7c2c8abc4e6a8dcfcbb8 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Qtcreator_libclang: Support for LLVM 16.0.0-rc2Cristian Adam2023-02-221-196/+22
| | | | | | | | | | | | | Set HAVE_CLANG_REPL_SUPPORT to OFF, which fixes a linking error with Visual C++ due to the high number of symbols (>65k) Qt 6.4 has a different naming scheme. Use ClangCodeModel plugin tests for the PGO training, which use clangd. Change-Id: I9c823d8bcdeaa8d7ce638624f6de285fc3fbf9c5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* PL103: os.makedirs(path) should be replaced by path.mkdir(parents=True)v6.5.0-beta2-packagingPatrik Teivonen2023-01-241-1/+1
| | | | | Change-Id: Ie72f6555f99eeb8e499011d43d3035424ed9647f Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* PL119: os.path.basename("foo/bar") should be replaced by bar_path.namePatrik Teivonen2023-01-131-3/+4
| | | | | | | | | Get basename of a path using pathlib.Path.name. Enable PL119 in flake8. Update copyright year for changed files. Change-Id: Ice7cd7e9246950dd39321b108bb68c9466f62189 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Prefer raising SystemExit directly instead of importing sys.exitPatrik Teivonen2022-10-121-4/+2
| | | | | Change-Id: I83330486be20cfecf673b8c8f395cbd1de6d1c43 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add missing type hints, enable strict mypy checkingPatrik Teivonen2022-09-221-35/+35
| | | | | | | | 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>
* pylint: Add miscellaneous checksv6.4.0-rc1-packagingPatrik Teivonen2022-09-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pylint: Add checking for PEP8 naming style conventions (C0103)Patrik Teivonen2022-09-081-0/+339
Enable checking for invalid-name C0103 in pylint. Change all remaining names to be PEP8 compliant. Ignore false positive constants. Note: patch renames some python modules Change-Id: I6ddd338e3ed260280e5fd9b356406603b8cc3ccc Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>