Skip to content

Commit

Permalink
feat: add mypy, update tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Nov 24, 2023
1 parent 96524b9 commit 3c2f80c
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 224 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Formatting and Tests
name: Linting and Tests

on:
- pull_request

jobs:
test:
runs-on: ubuntu-latest
name: Pytest and Black formatting
name: Linting and Tests

strategy:
max-parallel: 4
Expand All @@ -28,13 +28,16 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
poetry install --with dev
- name: Check Formatting
run: |
poetry run black --check .
poetry run flake8 .
poetry run isort --check .
- name: Check Typing
run: poetry run mypy --strict .

- name: Run Tests
run: poetry run pytest
19 changes: 13 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
repos:
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
- id: mypy
args: [--strict]
additional_dependencies: [pydantic, pytest, pytest_mock]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: stable
rev: 23.7.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
name: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
Empty file added flagsmith/py.typed
Empty file.
Loading

0 comments on commit 3c2f80c

Please sign in to comment.