Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,27 @@ jobs:
run: tox
env:
PLATFORM: ${{ matrix.platform }}

lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- uses: actions/checkout@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry tox tox-gh-actions

- name: Check formatting with `black`
run: tox -e black -- .

- name: Check imports with `isort`
run: tox -e isort -- .
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[tool.black]
line-length = 100
skip-string-normalization = true
target_version = ['py38']
target_version = ['py311']
include = '.*\.pyi?$'

[tool.isort]
profile = "black"
skip_gitignore = true

[tool.poetry]
name = "pymidi"
version = "0.6.0-pre1"
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ usedevelop = True

[testenv:black]
commands =
black -l 99 -t py311 --check --diff {posargs}
black -l 100 -t py311 --check --diff {posargs}
deps =
black

[testenv:black-fix]
commands =
black -l 99 -t py311 .
black -l 100 -t py311 .
deps =
black

Expand All @@ -56,7 +56,7 @@ deps =

[testenv:isort]
commands =
isort --check-only --diff src tests
isort --check-only --diff .
deps =
isort

Expand Down