Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:check_python_code [2014/07/29 08:37] – pylint format changed and some simple information sagarchalise | howtos:check_python_code [2018/08/07 15:51] (current) – add new way of using pylint craynic | ||
---|---|---|---|
Line 4: | Line 4: | ||
- | ===== Using pep8 and pylint ===== | + | ===== Using pycodestyle |
- | The following steps enable you to check your code with Pylint, Pyflakes and Pep8. | + | The following steps enable you to check your code with Pylint, Pyflakes and Pycodestyle (formerly known as pep8). |
Line 18: | Line 18: | ||
#!/bin/sh | #!/bin/sh | ||
- | echo " | + | echo " |
- | pep8 $1 | + | pycodestyle |
echo " | echo " | ||
pyflakes $1 | pyflakes $1 | ||
echo " | echo " | ||
pylint --msg-template=" | pylint --msg-template=" | ||
+ | pylint -f parseable -r n $1 | ||
</ | </ | ||
Line 35: | Line 36: | ||
</ | </ | ||
- | + | ||
==== Setup Geany ==== | ==== Setup Geany ==== | ||
Line 52: | Line 54: | ||
+ | ==== Using pylint on Windows ==== | ||
+ | |||
+ | Gösta Ljungdahl mentioned, the following little batch script is useful to use pylint on Windows with Geany: | ||
+ | |||
+ | <code dos pylint.bat> | ||
+ | @echo off | ||
+ | set configfile=c: | ||
+ | echo " | ||
+ | c: | ||
+ | </ | ||
+ | |||
+ | Of course, you need to tweak the paths to the config file and pylint.exe. | ||
+ | The rest should be similar to the explainations above. | ||
Line 86: | Line 101: | ||
- | {{tag> | + | {{tag> |