I\'m doing static code analysis using openstack/bandit. Do have a lot of repositories, some of those are in python 2 other in python 3. How can I detect if code is syntactically
The most basic validation that you could do ensure your code is python3 compatible syntaxically is to run pylint3 for that particular module and look for errors.
Install pylint3
sudo apt-get install pylint3
Run pylint3 for a python module
pylint3 -E
The above could be used to catch syntax errors in a module with respect to python3.