File tree 4 files changed +58
-2
lines changed
4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 19
19
- uses : py-actions/flake8@v2
20
20
with :
21
21
path : " src/ tests/"
22
- plugins : " flake8-bugbear flake8-black"
22
+ plugins : " flake8-bugbear flake8-black flake8-isort "
Original file line number Diff line number Diff line change @@ -31,6 +31,19 @@ poetry install --with dev --with doc
31
31
Documentation is built using Sphinx.
32
32
This is done automatically and hosted by [ ReadTheDocs] ( https://about.readthedocs.com/ ) .
33
33
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
+
34
47
## Tools
35
48
36
49
See RTD documentation for full overview of usage: https://twincat-tools.readthedocs.io/latest/pages/tools.html
Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ GitPython= "^3.1.43"
28
28
optional = true
29
29
[tool .poetry .group .dev .dependencies ]
30
30
black = " ^24.10.0"
31
+ isort = " ^5.13.2"
31
32
pytest = " ^8.3.3"
32
33
pytest-cov = " ^5.0.0"
33
34
pytest-mock = " ^3.14.0"
34
35
flake8 = " ^7.1.1"
35
36
flake8-bugbear = " ^24.8.19"
36
37
flake8-black = " ^0.3.6"
38
+ flake8-isort = " ^6.1.1"
37
39
38
40
[tool .poetry .group .doc ]
39
41
optional = true
@@ -48,5 +50,14 @@ tc_xml_sort = "tctools.xml_sort.__main__:main_argv"
48
50
tc_git_info = " tctools.git_info.__main__:main_argv"
49
51
tc_make_release = " tctools.make_release.__main__:main_argv"
50
52
53
+ # ----------- Other tools -----------
54
+
55
+ [tool .black ]
56
+ # Empty
57
+
58
+ [tool .isort ]
59
+ profile = " black"
60
+ skip_gitignore = true
61
+
51
62
# [flake8]
52
63
# See `.flake8`, no support for `pyproject.toml` yet
You can’t perform that action at this time.
0 commit comments