Skip to content
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

dev: format changed files on push #72

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203, E501
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-json
- id: check-toml
- id: check-yaml
- id: check-merge-conflict
- id: debug-statements
- id: name-tests-test
- repo: local
# run all of these hooks from the Poetry versions
hooks:
- id: isort
name: isort
entry: python3 -m isort
language: system
types: [python]
require_serial: true
- id: black
name: black
entry: python3 -m black
language: system
types: [python]
require_serial: true
- id: flake8
name: flake8
entry: python3 -m flake8
language: system
types: [python]
require_serial: true
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contributing

## Technical Notes

Please install our pre-commit scripts to ensure your code is properly formatted.

```bash
python3 -m pip install pre-commit black flake8 isort
pre-commit install
```
3 changes: 3 additions & 0 deletions fogros2/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black
flake8
isort