8000 Update dev guide to reflect switch from pycodestyle to black by bcantoni · Pull Request #983 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Update dev guide to reflect switch from pycodestyle to black #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ Here's a quick checklist to follow when coding to ensure a good pull request
goal.
- Ensure all indentation is done as 4-spaces and your editor is set to unix line
endings.
- The code matches PEP8 style guides. Make sure to run
`pycodestyle tableauserverclient test samples` to catch and fix any style
issues before submitting your pull request.
8E55 - The code matches PEP8 style guides, enforced by the black formatter. Make sure to run
`black --line-length 120 tableauserverclient samples test` to catch and fix any style
issues before submitting your pull request. (Run black with the `--check` option if
you want to check whether formatting is valid without changing any files.)
- Keep commit messages clean and descriptive.

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

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

```shell
Expand All @@ -94,8 +95,8 @@ issue.
if [ -e tableauserverclient/__init__.py ];
then
# check for style conventions in all code dirs
echo Running pycodestyle
pycodestyle tableauserverclient test samples
echo Running black format check
black --check --line-length 120 tableauserverclient samples test
fi
```

Expand Down
0