buildtest.tools.stylecheck
Module Contents
Functions
|
This method is a wrapper to BuildTestCommand used with running black, isort, and pyflakes during style check |
|
This method will run black check given a set of source files and black options. |
|
This method will run isort checks which performs import sorting for buildtest |
|
This method will run pyflakes checks which checks for unused imports and errors |
|
This method runs buildtest style checks which is invoked via |
- buildtest.tools.stylecheck.run_command(cmd, msg)[source]
This method is a wrapper to BuildTestCommand used with running black, isort, and pyflakes during style check
- buildtest.tools.stylecheck.run_black(source_files, black_opts)[source]
This method will run black check given a set of source files and black options. If black is not available we will return immediately otherwise we run black checks and print output and error message reported by black.
- buildtest.tools.stylecheck.run_isort(source_files, isort_opts)[source]
This method will run isort checks which performs import sorting for buildtest codebase. If isort is not available we return immediately.
- buildtest.tools.stylecheck.run_pyflakes(source_files)[source]
This method will run pyflakes checks which checks for unused imports and errors in source files.
- Parameters:
source_files (list) – List of source files to apply pyflakes check
- buildtest.tools.stylecheck.run_style_checks(no_black, no_isort, no_pyflakes, apply_stylechecks)[source]
This method runs buildtest style checks which is invoked via
buildtest stylecheck
command.- Parameters:
no_black (bool) – Disable black check if no_black=True.
no_isort (bool) – Disable isort check if no_isort=True.
no_pyflakes (bool) – Disable pyflakes check if no_pyflakes=True.
apply_stylechecks (bool) – If apply_stylechecks=True then black and isort stylecheck will be applied to codebase, by default these checks will report changes to codebase without applying changes.