Preserve legacy API options in workers

This commit is contained in:
Sean Doherty 2026-05-16 22:43:12 -05:00
parent ee03327c82
commit 4ae06799c3
6 changed files with 53 additions and 7 deletions

View file

@ -13,3 +13,17 @@ def test_legacy_api(tmpdir):
style_guide = legacy.get_style_guide()
report = style_guide.check_files([t_py.strpath])
assert report.total_errors == 1
def test_legacy_api_parallel_checks_use_option_overrides(tmpdir):
long_line = f"x = \"{'a' * 80}\"\n"
assert len(long_line.rstrip()) == 86
file1 = tmpdir.join("file1.py")
file1.write(long_line)
file2 = tmpdir.join("file2.py")
file2.write(long_line)
style_guide = legacy.get_style_guide(max_line_length=88)
report = style_guide.check_files([file1.strpath, file2.strpath])
assert report.total_errors == 0