question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The latest master does not pass `make lint`

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wweiccommented, Oct 17, 2018

@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.

1reaction
bonotakecommented, Oct 17, 2018

@tqchen Thanks. So we should change the description in this document:

Make sure code style check pass by typing make lint, and all the existing test-cases pass.

Maybe I can fix it later.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found