Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
|
wiki2:python:flake8 [2019/03/18 08:58] alfred [Using it with...] |
wiki2:python:flake8 [2020/05/09 09:25] (actual) |
||
|---|---|---|---|
| Línea 27: | Línea 27: | ||
| The output format is: \\ | The output format is: \\ | ||
| ''file path : line number : column number : error code : short description'' | ''file path : line number : column number : error code : short description'' | ||
| + | |||
| + | Flake8 will exit with code 1 if there are errors. You can change this using the parameter: ''<nowiki>--exit-zero</nowiki>'' | ||
| Error code prefix: | Error code prefix: | ||
| Línea 71: | Línea 73: | ||
| ==== Interesting usages ==== | ==== Interesting usages ==== | ||
| Parameters: | Parameters: | ||
| - | * ''<nowiki>--count<nowiki>'' to print the number of errors. | + | * ''<nowiki>--count</nowiki>'' to print the number of errors. |
| - | * ''<nowiki>--select=E4,E51,W234<nowiki>'' to select which errors analyse. | + | * ''<nowiki>--select=E4,E51,W234</nowiki>'' to select which errors analyse. |
| - | * ''<nowiki>--ignore=E4,E51,W234<nowiki>'' to select which errors ignore. | + | * ''<nowiki>--ignore=E4,E51,W234</nowiki>'' to select which errors ignore. |
| - | * ''<nowiki>--show-source<nowiki>'' to show the code where the error was found. | + | * ''<nowiki>--show-source</nowiki>'' to show the code where the error was found. |
| * ''<nowiki>--output-file=OUTPUT_FILE</nowiki>'' to redirect the output to a text file. | * ''<nowiki>--output-file=OUTPUT_FILE</nowiki>'' to redirect the output to a text file. | ||
| - | * ''<nowiki>--config=CONFIG<nowiki>'' to select the config file. | + | * ''<nowiki>--config=CONFIG</nowiki>'' to select the config file. |
| - | * ''<nowiki>--statistics<nowiki>'' to show statistics about errors and warnings. | + | * ''<nowiki>--statistics</nowiki>'' to show statistics about errors and warnings. |
| === Using hooks for version control === | === Using hooks for version control === | ||
| Línea 86: | Línea 88: | ||
| + | ==== Plugins ==== | ||
| + | |||
| + | To see which plugins are enabled: | ||
| + | <code> | ||
| + | flake8 --version | ||
| + | </code> | ||
| + | |||
| + | To temporally enable disabled plugins: ''<nowiki>--enabled-extensions=ENABLED_EXTENSIONS</nowiki>''. | ||