Skip to content

Commit ba54162

Browse files
Ensure Black version consistency
1 parent 4a14441 commit ba54162

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ jobs:
88
steps:
99
- uses: actions/checkout@v3
1010
- uses: psf/black@stable
11+
with:
12+
options: "--check"
13+
version: "22.12.0"

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ black path/to/module.py
4242
Or, get your IDE or editor to automatically re-format files as you save. Configuration
4343
instructions [here](https://black.readthedocs.io/en/stable/integrations/editors.html)
4444

45-
Note for pycharm users: The blackd plugin requires a blackd daemon to be running; add it to your crontab.
45+
> Note for pycharm users: The blackd plugin requires a blackd daemon to be running; add it to your crontab.
4646
4747
Or, configure your local git install to automatically check and fix your code
4848
as you commit. Configuration instructions
4949
[here](https://black.readthedocs.io/en/stable/integrations/source_version_control.html)
50+
51+
### Black version
52+
53+
Black needs to be consistent between the version running in the CI build and your local environment. To check the currently used version, see the [GitHub action config](https://github.com/robcarver17/pysystemtrade/blob/master/.github/workflows/lint.yml)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ addopts = "--ignore=systems/provided/moretradingrules/temp.py"
55
[tool.black]
66
line-length = 88
77
target-version = ['py38']
8+
required-version = '22.12.0'

0 commit comments

Comments
 (0)