Skip to content

Commit 53400d8

Browse files
authored
Merge pull request robcarver17#984 from bug-or-feature/black_config
pin Black version
2 parents 75449d0 + 6efece1 commit 53400d8

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/lint.yml

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

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ 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)
5050

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 `[tool.black]` section of the project TOML file (https://github.com/robcarver17/pysystemtrade/blob/master/pyproject.toml)
54+
5155
## General code guidelines (INCOMPLETE)
5256

5357
These guidelines are aspirations, and do not describe the system as it stands. The project has been written over a period of several years, and it is only quite recently I've decided to set out some guidelines.

pyproject.toml

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

0 commit comments

Comments
 (0)