mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
1995d2e7ca
1ef2138c0db3bd4f9332c777fa3fb2770dc1b08c lint: run mypy over contrib/devtools (fanquake) Pull request description: wumpus mentioned on IRC that we don't currently run `mypy` over the `contrib/devtools` directory, and that it would likely be worthwhile given #20434. This just adds that dir to the linter, as well as some missing annotations to fix existing errors. Note that now we require Python 3.6 we can make use of variable annotations. master (patched to check contrib devtools): ```bash test/lint/lint-python.sh contrib/devtools/symbol-check.py:154: error: Incompatible types in assignment (expression has type "List[str]", variable has type "str") contrib/devtools/circular-dependencies.py:35: error: Need type annotation for 'deps' (hint: "deps: Dict[<type>, <type>] = ...") contrib/devtools/circular-dependencies.py:67: error: Need type annotation for 'closure' (hint: "closure: Dict[<type>, <type>] = ...") Found 4 errors in 3 files (checked 187 source files) ``` I haven't quite gone as far as to add annotations like ```python CHECKS: Dict[str, List[Tuple[str, Callable[[Any], bool]]]] = {... ``` to `symbol-check.py`. ACKs for top commit: laanwj: ACK 1ef2138c0db3bd4f9332c777fa3fb2770dc1b08c Tree-SHA512: a58c2ece588c640289dc1d35dad5b1b8732788272daa0965d6bf44ee8a7f7c8e8585f94d233ac41c84b9ffcfc97841a00fe2c9acba41f58fd164f01de4b6512b |
||
---|---|---|
.. | ||
check-doc.py | ||
check-rpc-mappings.py | ||
commit-script-check.sh | ||
extended-lint-all.sh | ||
extended-lint-cppcheck.sh | ||
git-subtree-check.sh | ||
lint-all.sh | ||
lint-assertions.sh | ||
lint-circular-dependencies.sh | ||
lint-cppcheck-dash.sh | ||
lint-filenames.sh | ||
lint-format-strings.py | ||
lint-format-strings.sh | ||
lint-git-commit-check.sh | ||
lint-include-guards.sh | ||
lint-includes.sh | ||
lint-locale-dependence.sh | ||
lint-logs.sh | ||
lint-python-dead-code.sh | ||
lint-python-mutable-default-parameters.py | ||
lint-python-utf8-encoding.sh | ||
lint-python.sh | ||
lint-rpc-help.sh | ||
lint-shebang.sh | ||
lint-shell-locale.sh | ||
lint-shell.sh | ||
lint-spelling.ignore-words.txt | ||
lint-spelling.sh | ||
lint-submodule.py | ||
lint-tests.py | ||
lint-whitespace.sh | ||
README.md |
This folder contains lint scripts.
check-doc.py
Check for missing documentation of command line options.
commit-script-check.sh
Verification of scripted diffs. Scripted diffs are only assumed to run on the latest LTS release of Ubuntu. Running them on other operating systems might require installing GNU tools, such as GNU sed.
git-subtree-check.sh
Run this script from the root of the repository to verify that a subtree matches the contents of the commit it claims to have been updated to.
Usage: test/lint/git-subtree-check.sh [-r] DIR [COMMIT]
test/lint/git-subtree-check.sh -?
DIR
is the prefix within the repository to check.COMMIT
is the commit to check, if it is not provided, HEAD will be used.-r
checks that subtree commit is present in repository.
To do a full check with -r
, make sure that you have fetched the upstream repository branch in which the subtree is
maintained:
- for
src/secp256k1
: https://github.com/bitcoin-core/secp256k1.git (branch master) - for
src/leveldb
: https://github.com/bitcoin-core/leveldb.git (branch bitcoin-fork) - for
src/univalue
: https://github.com/bitcoin-core/univalue.git (branch master) - for
src/crypto/ctaes
: https://github.com/bitcoin-core/ctaes.git (branch master) - for
src/crc32c
: https://github.com/google/crc32c.git (branch master)
To do so, add the upstream repository as remote:
git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git
lint-all.sh
Calls other scripts with the lint-
prefix.