cclauss opened a new pull request #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690
 
 
   Work in Progress: Do not merge.  
   
   F82 tests are almost always _undefined names_ which are usually a sign of a 
typo, missing imports, or code that has not been ported to Python 3.  These 
also would be compile-time errors in a compiled language but in Python a 
__NameError__ is raised which will halt/crash the script on the user. 
   
   This test on this repo raises a lot of false reports because it gets really 
confused by the 
[HYBRID_GLOBALS](https://github.com/apache/incubator-tvm/blob/master/python/tvm/hybrid/runtime.py#L113)
 approach of adding globals without declaring them as globals in the local 
scope.  (This could be overcome by adding them as `--builtins=` in the flake8 
command.)
   
   However, there are other undefined names that are not in HYBRID_GLOBALS that 
should be addressed such as the missing import of tensorflow.
   
   Thanks for contributing to TVM!   Please refer to guideline 
https://docs.tvm.ai/contribute/ for useful information and tips. After the pull 
request is submitted, please request code reviews from 
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
 by @ them in the pull request thread.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to