From e67fa36803334193402f2fee4d2647a3154fd790 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 5 Aug 2018 11:13:49 -0700 Subject: [PATCH] lint: Update config to split files more evenly. --- tools/lint | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/lint b/tools/lint index c55a8624f6..5f69e5a9c4 100755 --- a/tools/lint +++ b/tools/lint @@ -13,7 +13,7 @@ sanity_check.check_venv(__file__) from zulint import lister from zulint.command import add_default_linter_arguments, LinterConfig from typing import cast, Callable, Dict, Iterator, List - +import random def run(): # type: () -> None @@ -118,10 +118,19 @@ def run(): failed = check_pyflakes(by_lang['py'], args) return 1 if failed else 0 + python_part1 = {x for x in by_lang['py'] if random.randint(0, 1) == 0} + python_part2 = {y for y in by_lang['py'] if y not in python_part1} + @linter_config.lint - def pep8(): + def pep8_1of2(): # type: () -> int - failed = check_pep8(by_lang['py']) + failed = check_pep8(list(python_part1)) + return 1 if failed else 0 + + @linter_config.lint + def pep8_2of2(): + # type: () -> int + failed = check_pep8(list(python_part2)) return 1 if failed else 0 linter_config.do_lint()