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 c0b64e3 commit b215d3aCopy full SHA for b215d3a
tools/lint
@@ -1,6 +1,7 @@
1
#! /usr/bin/env python3
2
3
import argparse
4
+import re
5
import sys
6
7
from zulint.command import LinterConfig, add_default_linter_arguments
@@ -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