fanquake
ffdab41f94
Merge bitcoin/bitcoin#23474 : test: scripted-diff cleanups after generate* changes
...
fac23c2114
scripted-diff: Bump copyright headers (MarcoFalke)
fa974f1f14
scripted-diff: Remove redundant sync_all and sync_blocks (MarcoFalke)
fad13991ae
test: Properly set sync_fun in NodeNetworkLimitedTest (MarcoFalke)
faeff57709
test: Use 4 spaces for indentation (MarcoFalke)
Pull request description:
Some cleanups after commit 94db963de5
ACKs for top commit:
fanquake:
ACK fac23c2114
Tree-SHA512: 5acfd5bb9679b41969d0fc6fc85801ccadcd6530ea692bac6352668e06fc7a9b0e1db3fd6fba435e84afe983d2eb07bd0a47c8364462bb7110004bd3d102b698
2021-11-16 11:22:06 +08:00
Hennadii Stepanov
fe0ff569ea
test: Enable SC2046 shellcheck rule
2021-11-13 18:05:26 +02:00
MarcoFalke
fac23c2114
scripted-diff: Bump copyright headers
...
The previous diff touched most files in ./test/, so bump the headers to
avoid having to touch them again for a bump later.
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./test/
-END VERIFY SCRIPT-
2021-11-10 11:10:24 +01: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