Age | Commit message (Collapse) | Author |
|
update lint-python.sh to include check F632
|
|
Updates Python linters, spellchecking, and ShellCheck versions. The PR links are updated for
the dependency versions in test/README.md. ShellCheck SC2230 removed to align with with new
behaviour in v0.7.1.
Fixes #19346.
|
|
|
|
Support for type hints was introduced in Python 3.5. Type hints make it easier to read and review code in my opinion. Also an IDE may discover a potential bug sooner. Yet, as PEP 484 says: "It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention."
Mypy is used in lint-python.sh to do the type checking. The package is standard so there is little chance that it will be abandoned. Mypy checks that type hints in source code are correct when they are not, it fails with an error.
Useful resources:
* https://docs.python.org/3.5/library/typing.html
* https://www.python.org/dev/peps/pep-0484/
|
|
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
|
|
test/README.md contains comprehensive install instructions.
|
|
In the words of MarcoFalke:
"W504 should be disabled. This is not a critical error that should be blocking a merge"
https://github.com/bitcoin/bitcoin/pull/15257#discussion_r302017280
|
|
|
|
This assures consistent recording of the enabled linters.
|
|
|
|
|
|
The brew installed flake8 version is Python 2 based and does not work.
|
|
|
|
|
|
|