Hennadii Stepanov
fe0ff569ea
test: Enable SC2046 shellcheck rule
2021-11-13 18:05:26 +02:00
josibake
a46f71bb70
lint: enable mypy checking for missing imports
...
Achieve this by adding some ignore, and making data/ importable.
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2021-10-16 09:14:37 +08:00
Carl Dong
d6ef3543ae
lint: Run mypy with --show-error-codes
...
When using mypy ignore directives, the error code needs to be specified.
Somehow mypy doesn't print it by default...
2021-07-07 19:30:47 +08:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
fanquake
1ef2138c0d
lint: run mypy over contrib/devtools
2020-12-28 14:25:06 +08:00
Tyler Chambers
b6121edf70
swapped "is" for "==" in literal comparison
...
update lint-python.sh to include check F632
2020-11-09 10:21:51 -05:00
Duncan Dean
39d526bde4
test: Bump linter versions
...
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 .
2020-06-22 20:15:53 +02:00
Hennadii Stepanov
7dda912e1c
test: Do not swallow flake8 exit code
2020-06-05 16:15:31 +03:00
Kiminuo
bd7e530f01
This PR adds initial support for type hints checking in python scripts.
...
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/
2020-06-02 08:03:02 +02:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
Hennadii Stepanov
80c9e66ab8
build: Remove install command samples
...
test/README.md contains comprehensive install instructions.
2019-11-06 13:22:06 +02:00
Ben Woosley
838920704a
lint: Disable flake8 W504 warning
...
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
2019-09-03 14:40:56 -04:00
practicalswift
3c5254a820
Limit Python linting to files in the repo
2019-05-30 22:36:54 +02:00
Ben Woosley
948d8f4f10
lint: Enable python linters via an array
...
This assures consistent recording of the enabled linters.
2019-01-20 17:13:22 -08:00
Daniel Ingram
c9ba253f4f
Add E711 to flake8 check
2018-12-10 15:12:09 -05:00
James O'Beirne
854c85ae90
test: allow arguments to be forwarded to flake8 in lint-python.sh
2018-09-24 18:24:25 -04:00
practicalswift
341f7c7b0e
macOS fix: Check for correct version of flake8 to avoid spurious warnings. The brew installed flake8 version is Python 2 based and does not work.
2018-08-31 00:58:47 +02:00
practicalswift
68400d8b96
tests: Use explicit imports
2018-08-13 14:13:39 +02:00
practicalswift
3352da8da1
Add "export LC_ALL=C" to all shell scripts
2018-06-14 15:27:52 +02:00
MarcoFalke
fa3c910bfe
test: Move linters to test/lint, add readme
2018-05-24 12:02:15 -04:00