Skip to content

Commit

Permalink
Drop support for Python 3.8 and lower, add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
emarondan authored Nov 6, 2024
1 parent 9e06e1c commit c99cfcb
Show file tree
Hide file tree
Showing 13 changed files with 1,842 additions and 2,744 deletions.
6 changes: 6 additions & 0 deletions .bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
skips:
- B101 # assert_used, needed for mypy
- B311
- B320
- B410
exclude_dirs: ['tests']
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 88
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# applying pre-commit hooks to the project
ca42e4247d872a174afc539902e156282940ad5d
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.6"
env:
TOXENV: py
- python-version: "3.7"
env:
TOXENV: py
- python-version: "3.8"
- python-version: "3.9"
env:
TOXENV: py
- python-version: "3.9"
Expand Down Expand Up @@ -49,3 +43,9 @@ jobs:
run: |
pip install -U tox
tox
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected]
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@
.tox/
.pytest_cache/
.coverage

# python virtual env
.venv/
venv/
.env/
env/
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile = black
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
args: [-r, -c, .bandit.yml]
- repo: https://github.com/psf/black.git
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
2 changes: 1 addition & 1 deletion price_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
from .parser import Price, parse_price
from .parser import Price, parse_price # noqa F401
Loading

0 comments on commit c99cfcb

Please sign in to comment.