Skip to content

Commit ed46654

Browse files
authored
Linter (#1)
* Linter
1 parent 8513f20 commit ed46654

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/formatter.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Python Formatter (isort & black)
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
formatting:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.9'
16+
- name: Install isort and black
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install isort black
20+
- name: Run isort and black
21+
run: |
22+
isort -c .
23+
black --check .

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
[build-system]
22
requires = ["setuptools>=67.0"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.isort]
6+
line_length = 120
7+
multi_line_output = 1
8+
include_trailing_comma = true
9+
10+
[tool.black]
11+
line_length = 120

0 commit comments

Comments
 (0)