Skip to content

Commit 5e6edaf

Browse files
authored
Update dev guide to reflect switch from pycodestyle to black (#983)
Follow-on to code and CI pipeline changes in #935 Fixes #933
1 parent 0667750 commit 5e6edaf

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docs/dev-guide.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ Here's a quick checklist to follow when coding to ensure a good pull request
6767
goal.
6868
- Ensure all indentation is done as 4-spaces and your editor is set to unix line
6969
endings.
70-
- The code matches PEP8 style guides. Make sure to run
71-
`pycodestyle tableauserverclient test samples` to catch and fix any style
72-
issues before submitting your pull request.
70+
- The code matches PEP8 style guides, enforced by the black formatter. Make sure to run
71+
`black --line-length 120 tableauserverclient samples test` to catch and fix any style
72+
issues before submitting your pull request. (Run black with the `--check` option if
73+
you want to check whether formatting is valid without changing any files.)
7374
- Keep commit messages clean and descriptive.
7475

7576
### Use git pre-commit hook
@@ -84,7 +85,7 @@ Create a file `pre-commit` with the contents below and mark it as executable
8485

8586
To test that the hook is working correctly, make a style-inconsistent change (for
8687
example, changing some indentation to not be a multiple of 4), then try to commit
87-
locally. You should get a failure with an explanation from pycodestyle with the
88+
locally. You should get a failure with an explanation from black with the
8889
issue.
8990

9091
```shell
@@ -94,8 +95,8 @@ issue.
9495
if [ -e tableauserverclient/__init__.py ];
9596
then
9697
# check for style conventions in all code dirs
97-
echo Running pycodestyle
98-
pycodestyle tableauserverclient test samples
98+
echo Running black format check
99+
black --check --line-length 120 tableauserverclient samples test
99100
fi
100101
```
101102

0 commit comments

Comments
 (0)