We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9d1367 commit 992dcabCopy full SHA for 992dcab
tools/lint
@@ -2,6 +2,7 @@
2
3
import argparse
4
import sys
5
+import re
6
7
from zulint.command import LinterConfig, add_default_linter_arguments
8
@@ -44,6 +45,15 @@ def run() -> None:
44
45
description="Sorts Python import statements",
46
check_arg=["--check-only", "--diff"],
47
)
48
+ linter_config.external_linter(
49
+ "black",
50
+ ["black"],
51
+ ["py"],
52
+ description="Reformats Python code",
53
+ check_arg=["--check"],
54
+ suppress_line=lambda line: line == "All done! ✨ 🍰 ✨\n"
55
+ or re.fullmatch(r"\d+ files? would be left unchanged\.\n", line) is not None,
56
+ )
57
58
@linter_config.lint
59
def custom_py() -> int:
0 commit comments