python: how to check syntax of python file/script without executing it?
You can check the syntax by compiling it: python -m py_compile script.py
You can check the syntax by compiling it: python -m py_compile script.py
The tsc –noEmit is what you’re searching. Do not emit compiler output files like JavaScript source code, source-maps or declarations. source TSDocs If you want lint code as well as check types on CI use tsc –noEmit && eslint source Stackoverflow comment
python -m py_compile script.py
You can check the syntax by compiling it: python -m py_compile script.py