kopia lustrzana https://github.com/jazzband/icalevents
feat: add black, flake config and pre-commit
rodzic
74b2bdcd09
commit
5f51f18968
|
@ -0,0 +1,3 @@
|
||||||
|
[flake8]
|
||||||
|
max-complexity = 10
|
||||||
|
select = E9,F63,F7,F82
|
|
@ -22,14 +22,12 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install flake8 pytest coverage
|
pip install pipenv==v2021.5.29
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
pipenv install --dev --deploy
|
||||||
- name: Lint with flake8
|
- name: Lint with black and flake
|
||||||
run: |
|
run: |
|
||||||
# stop the build if there are Python syntax errors or undefined names
|
black --check icalevents
|
||||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
flake8 . --count --exit-zero
|
||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
||||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
coverage run test.py
|
coverage run test.py
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
ci:
|
||||||
|
skip: [pylint]
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v2.3.0
|
||||||
|
hooks:
|
||||||
|
- id: check-yaml
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 21.9b0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
args: ['--check']
|
||||||
|
- repo: https://gitlab.com/pycqa/flake8
|
||||||
|
rev: 3.7.9
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
Ładowanie…
Reference in New Issue