File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 1
1
ci :
2
2
autoupdate_commit_msg : ' build(deps): pre-commit autoupdate'
3
- autofix_commit_msg : ' chore : apply auto fixes with pre-commit'
3
+ autofix_commit_msg : ' style : apply auto fixes with pre-commit'
4
4
skip :
5
5
- pylint
6
6
52
52
name : flake8-ignition-api
53
53
files : ^ignition-api/src/
54
54
args : [--config, ignition-api/tox.ini]
55
+ additional_dependencies : [pydoclint]
55
56
- repo : https://github.com/PyCQA/flake8
56
57
rev : 7.3.0
57
58
hooks :
@@ -68,12 +69,6 @@ repos:
68
69
files : ^ignition-api/src/
69
70
exclude : ^ignition-api/src/(ch|com|dev|java|javax|org)/
70
71
args : [--config, ignition-api/tox.ini]
71
- - repo : https://github.com/jsh9/pydoclint
72
- rev : 0.6.7
73
- hooks :
74
- - id : pydoclint-flake8
75
- files : ^ignition-api/src/
76
- args : [--config=ignition-api/tox.ini, --extend-ignore=F401]
77
72
- repo : https://github.com/commitizen-tools/commitizen
78
73
rev : v4.8.3
79
74
hooks :
Original file line number Diff line number Diff line change @@ -32,28 +32,33 @@ commands =
32
32
33
33
[testenv:style]
34
34
description = apply style
35
+ base_python = python3.12
35
36
skip_install = true
36
37
deps =
37
38
black
38
39
docformatter
39
40
flake8 ==5.0.4
40
41
isort
42
+ pydoclint
41
43
pydocstyle
42
44
sort-all
45
+ unimport
43
46
commands =
44
- bash -c ' sort-all $(find src -name "*.py" -type f)'
47
+ python -c \
48
+ " import pathlib, subprocess; \
49
+ files = [str(p) for p in pathlib.Path('src').rglob('*.py')]; \
50
+ subprocess.run(['sort-all'] + files, check=True)"
45
51
black --quiet src
46
- isort src
52
+ unimport src
53
+ isort --settings-file =tox.ini src
47
54
docformatter \
48
55
--in-place \
49
56
--wrap-summaries 72 \
50
57
--close-quotes-on-newline \
51
58
--recursive \
52
59
src
53
- flake8 src
54
- pydocstyle src
55
- allowlist_externals =
56
- bash
60
+ flake8 --select =DOC --config =tox.ini src
61
+ pydocstyle --config =tox.ini src{/}system
57
62
58
63
[type]
59
64
base_python = python3.12
@@ -66,10 +71,15 @@ wrap-summaries = 72
66
71
close-quotes-on-newline = true
67
72
68
73
[flake8]
69
- ignore = E741, F821
74
+ ignore = DOC202, E741, F821
70
75
max-complexity = 10
71
76
max-doc-length = 72
72
77
max-line-length = 120
78
+ # pydoclint
79
+ style = google
80
+ arg-type-hints-in-docstring = False
81
+ arg-type-hints-in-signature = False
82
+ check-return-types = False
73
83
74
84
[isort]
75
85
extra_standard_library = typing
You can’t perform that action at this time.
0 commit comments