Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_flake8():
# for some reason the pydocstyle logger changes to an effective level of 1
# set higher level to prevent the output to be flooded with debug messages
log.setLevel(logging.WARNING)
style_guide = get_style_guide(
extend_ignore=['D100', 'D104'],
show_source=True,
)
style_guide_tests = get_style_guide(
extend_ignore=['D100', 'D101', 'D102', 'D103', 'D104', 'D105', 'D107'],
show_source=True,
)
stdout = sys.stdout
sys.stdout = sys.stderr
# implicitly calls report_errors()
report = style_guide.check_files([
str(Path(__file__).parents[1] / 'bin' / 'colcon'),
str(Path(__file__).parents[1] / 'colcon_core'),