Skip to content

Commit

Permalink
Moved to poetry, added pre-commit, MIT->GPLv3
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvcc committed Apr 13, 2021
1 parent d28ef06 commit 7311b2d
Show file tree
Hide file tree
Showing 6 changed files with 804 additions and 81 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

[flake8]
max-line-length = 88
exclude = .git,__pycache__,old,build,dist,venv,.venv
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,5 @@ venv.bak/
# mypy
.mypy_cache/

.rss-parser
.rss-parser
poetry.lock
48 changes: 48 additions & 0 deletions .pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
repos:
# Use pre-commit repo, v3.4.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v3.4.0"
hooks:
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
stages: [ commit, push ]
# Simply check whether files parse as valid python.
- id: check-ast
stages: [ commit ]

# Use locally installed hooks
- repo: local

hooks:
- id: black
name: black
entry: poetry
args:
- run
- black
language: system
types: [ python ]
stages: [ commit ]
# Black should use the config from the pyproject.toml file

- id: isort
name: isort
entry: poetry
args:
- run
- isort
language: system
types: [ python ]
stages: [ commit ]
# isort's config is also stored in pyproject.toml

- id: flake8
name: flake8
entry: poetry
args:
- run
- flake8
language: system
always_run: true
pass_filenames: false
stages: [ push ]
Loading

0 comments on commit 7311b2d

Please sign in to comment.