[英]Can we run pylint while executing python script, such that when the pylint passes the code will execute else it will show pylint errors?
例如:假设我有一个python脚本test.py,所以当我运行python test.py脚本时,pylint应该首先执行,如果pylint成功执行,则应该执行tesy.py,否则应该给出pylint错误。
@falsetru : Thank you for the answer, another solution is that we can write a script in which we will run both the commands ie. @falsetru:谢谢您的回答,另一个解决方案是我们可以编写一个脚本,在其中将运行两个命令,即。 pylint test.py and if the rate of the code(output of the pylint) is greater than x (lets say x = 8) will run python test.py else show the pylint errors.
pylint test.py ,如果代码(pylint的输出)的速率大于x (假设x = 8),则会运行python test.py,否则将显示pylint错误。
ie instead of python test.py we will run my_script test.py 即代替python test.py我们将运行my_script test.py
my_script is the script which contains the above mentioned code. my_script是包含上述代码的脚本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.