简体   繁体   中英

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

ie instead of python test.py we will run my_script test.py

my_script is the script which contains the above mentioned code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM