add black workflow, change our code formats. closes #43

This commit is contained in:
IAmTomahawkx 2021-09-05 14:32:51 -07:00
parent 3ffe134895
commit 1833e984ce
3 changed files with 30 additions and 3 deletions

View File

@ -34,13 +34,13 @@ If the bug report is missing this information then it'll take us longer to fix t
## Submitting a Pull Request
Submitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't manage to have scope creep and it's probably good to go. It would be incredibly lovely if the style is consistent to that found in the project. This project follows PEP-8 guidelines (mostly) with a column limit of 125.
Submitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't manage to have scope creep, and it's probably good to go. It would be incredibly lovely if the style is consistent to that found in the project. This project follows the black code format, with a line length limit of `120`
### Git Commit Guidelines
- Use present tense (e.g. "Add feature" not "Added feature")
- Limit all lines to 72 characters or less.
- Reference issues or pull requests outside of the first line.
- Limit all lines to 120 characters or fewer.
- Reference issues or pull requests outside the first line.
- Please use the shorthand `#123` and not the full URL.
- Commits regarding the commands extension must be prefixed with `[commands]`

View File

@ -1,3 +1,5 @@
<!-- Pull requests that do not fill this information in will likely be closed -->
## Summary
<!-- What is this pull request for? Does it fix any issues? -->

25
.github/workflows/black.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Lint
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: install black
run: pip install black
- name: run linter
uses: wearerequired/lint-action@v1
with:
black: true
black_args: ". --line-length 120"
auto_fix: true