Skip to content

Commit

Permalink
Add black, isort and pyright to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MKuranowski committed Apr 28, 2024
1 parent 1e62fe6 commit 1e872e7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,22 @@ jobs:
run: pip install -e .
- name: Run tests
run: pytest
lint:
name: Lint code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: pip install -Ur requirements.dev.txt
- name: Check code formatting
run: black --check .
- name: Check imports order
run: isort --check .
- name: Install the library
run: pip install -e .
- name: Run typechecking
run: pyright
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ aiocsv = ["py.typed"]

[tool.setuptools.dynamic]
version = {attr = "aiocsv.__version__"}

[tool.black]
line-length = 99

[tool.isort]
profile = "black"
line_length = 99

[tool.pyright]
typeCheckingMode = "strict"
3 changes: 3 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ pytest
pytest-asyncio
setuptools
wheel
isort
black
pyright

0 comments on commit 1e872e7

Please sign in to comment.