Skip to content

Commit 14ba2d7

Browse files
committed
use pants to run black
1 parent 11989ed commit 14ba2d7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
jobs:
2626
# Lint checks which don't depend on any service containes, etc. to be running.
2727
lint-checks:
28-
name: 'Lint Checks (pants runs: shellcheck)'
28+
name: 'Lint Checks (pants runs: shellcheck, black)'
2929
runs-on: ubuntu-latest
3030

3131
env:

pants.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ backend_packages = [
1212
"pants.backend.python",
1313
"pants.backend.experimental.python", # activates twine `publish` support
1414
"pants.backend.python.mixed_interpreter_constraints",
15+
"pants.backend.python.lint.black",
1516

1617
# shell
1718
"pants.backend.shell",
@@ -80,3 +81,6 @@ root_patterns = [
8081
# benchmarks
8182
"/st2common/benchmarks/micro",
8283
]
84+
85+
[black]
86+
version = "black==22.3.0"

st2tests/st2tests/fixtures/packs/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ shell_sources(
2222

2323
python_sources(
2424
name="test_content_version",
25+
skip_black=True,
2526
dependencies=[
2627
":test_content_version_metadata",
2728
":test_content_version_shell",

0 commit comments

Comments
 (0)