Skip to content

Commit 1c1f2a4

Browse files
committed
Added isort and updated readme
1 parent 0b75af8 commit 1c1f2a4

File tree

4 files changed

+58
-2
lines changed

4 files changed

+58
-2
lines changed

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- uses: py-actions/flake8@v2
2020
with:
2121
path: "src/ tests/"
22-
plugins: "flake8-bugbear flake8-black"
22+
plugins: "flake8-bugbear flake8-black flake8-isort"

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ poetry install --with dev --with doc
3131
Documentation is built using Sphinx.
3232
This is done automatically and hosted by [ReadTheDocs](https://about.readthedocs.com/).
3333

34+
### Linting
35+
36+
Code style is enforced with black, isort and flake8.
37+
Format code with:
38+
```
39+
isort .
40+
black .
41+
```
42+
And verify code with: (flake8 extensions will also perform black and isort checks)
43+
```
44+
flake8 ./src ./tests
45+
```
46+
3447
## Tools
3548

3649
See RTD documentation for full overview of usage: https://twincat-tools.readthedocs.io/latest/pages/tools.html

poetry.lock

+33-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+11
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ GitPython= "^3.1.43"
2828
optional = true
2929
[tool.poetry.group.dev.dependencies]
3030
black = "^24.10.0"
31+
isort = "^5.13.2"
3132
pytest = "^8.3.3"
3233
pytest-cov = "^5.0.0"
3334
pytest-mock = "^3.14.0"
3435
flake8 = "^7.1.1"
3536
flake8-bugbear = "^24.8.19"
3637
flake8-black = "^0.3.6"
38+
flake8-isort = "^6.1.1"
3739

3840
[tool.poetry.group.doc]
3941
optional = true
@@ -48,5 +50,14 @@ tc_xml_sort = "tctools.xml_sort.__main__:main_argv"
4850
tc_git_info = "tctools.git_info.__main__:main_argv"
4951
tc_make_release = "tctools.make_release.__main__:main_argv"
5052

53+
# ----------- Other tools -----------
54+
55+
[tool.black]
56+
# Empty
57+
58+
[tool.isort]
59+
profile = "black"
60+
skip_gitignore = true
61+
5162
# [flake8]
5263
# See `.flake8`, no support for `pyproject.toml` yet

0 commit comments

Comments
 (0)