The latest master does not pass `make lint`
See original GitHub issueI found that make lint
produces some errors with the latest master (commit https://github.com/dmlc/tvm/commit/5bb666f2b0096d3ea5357812cae8cc2df5b25d2c).
I have tried to git clone
the repo, tried make lint
under the root directory immediately after that, and got the following messages.
python3 -m pylint python/tvm --rcfile=/Users/takeo/work/tvm/tests/lint/pylintrc
************* Module tvm.intrin
python/tvm/intrin.py:444:4: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module tvm.stmt
python/tvm/stmt.py:382:4: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module tvm.make
python/tvm/make.py:57:8: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module tvm.autotvm.record
python/tvm/autotvm/record.py:71:4: R1705: Unnecessary "elif" after "return" (no-else-return)
python/tvm/autotvm/record.py:115:4: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module tvm.autotvm.feature
python/tvm/autotvm/feature.py:150:12: R1715: Consider using dict.get for getting values from a dict if a key is present or a default if not (consider-using-get)
************* Module tvm.autotvm.task.task
python/tvm/autotvm/task/task.py:200:4: R1705: Unnecessary "elif" after "return" (no-else-return)
python/tvm/autotvm/task/task.py:319:8: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module tvm.autotvm.task.space
python/tvm/autotvm/task/space.py:321:8: R1705: Unnecessary "else" after "return" (no-else-return)
python/tvm/autotvm/task/space.py:444:15: R1714: Consider merging these comparisons with "in" to 'vec_ct in (0, 1)' (consider-using-in)
************* Module tvm.contrib.nvcc
python/tvm/contrib/nvcc.py:154:7: R1714: Consider merging these comparisons with "in" to 'cuda_ver in (9.0, 9.1)' (consider-using-in)
python/tvm/contrib/nvcc.py:161:15: R1716: Simplify chained comparison between the operands (chained-comparison)
************* Module tvm.contrib.verilog
python/tvm/contrib/verilog.py:119:4: R1705: Unnecessary "else" after "return" (no-else-return)
************* Module tvm._ffi.node_generic
python/tvm/_ffi/node_generic.py:37:4: R1705: Unnecessary "elif" after "return" (no-else-return)
************* Module tvm._ffi.function
python/tvm/_ffi/function.py:208:4: R1705: Unnecessary "else" after "return" (no-else-return)
python/tvm/_ffi/function.py:211:8: R1705: Unnecessary "else" after "return" (no-else-return)
************* Module tvm.rpc.client
python/tvm/rpc/client.py:12:0: C0414: Import alias does not rename original package (useless-import-alias)
************* Module tvm.rpc.server
python/tvm/rpc/server.py:334:24: W1509: Using preexec_fn keyword which may be unsafe in the presence of threads (subprocess-popen-preexec-fn)
************* Module tvm.rpc.tornado_util
python/tvm/rpc/tornado_util.py:95:12: R1705: Unnecessary "else" after "return" (no-else-return)
************* Module tvm.hybrid.parser
python/tvm/hybrid/parser.py:144:8: R1705: Unnecessary "elif" after "return" (no-else-return)
python/tvm/hybrid/parser.py:173:8: R1705: Unnecessary "else" after "return" (no-else-return)
python/tvm/hybrid/parser.py:194:12: R1705: Unnecessary "else" after "return" (no-else-return)
python/tvm/hybrid/parser.py:218:8: R1705: Unnecessary "elif" after "return" (no-else-return)
python/tvm/hybrid/parser.py:344:13: R1714: Consider merging these comparisons with "in" to "func_id in ('max', 'min')" (consider-using-in)
************* Module tvm.rpc.proxy
python/tvm/rpc/proxy.py:388:8: R1705: Unnecessary "elif" after "return" (no-else-return)
------------------------------------------------------------------
Your code has been rated at 9.97/10 (previous run: 9.97/10, +0.00)
make: *** [pylint] Error 28
The versions in my environment are listed below.
- Python: 3.6.3
- pylint 2.1.1
- astroid 2.0.4
- cpplint 1.3.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
The latest master does not pass make lint #1915 - GitHub
I found that make lint produces some errors with the latest master (commit 5bb666f). I have tried to git clone the repo, tried...
Read more >Install | golangci-lint
With golangci-lint this can happen if you use option --enable-all and a new linter is added or even without --enable-all when one upstream...
Read more >GitHub action for golangci-lint fails with can't load fmt
If I run it with go 1.18, it works fine. With go 1.19, it fails with the same error as given here. Share....
Read more >How to avoid broken master with Pipelines for Merged Results ...
The MR passed all of the tests in the CI pipelines, has been reviewed ... this pipeline fails because the latest master changed...
Read more >testing - Should I be enforcing lint rules on feature branches?
I recently had some consultants we use complain about requiring lint on every commit. Their response is they commit as they go and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bonotake the instructions to run unit tests locally should work(it’s not that fragile against python version). If it does not work for you, please post to https://discuss.tvm.ai/ and we can take a look.
@tqchen Thanks. So we should change the description in this document:
Maybe I can fix it later.