@@ -88,14 +88,133 @@ Source = "https://github.com/ansys/pyedb"
88
88
Discussions = " https://github.com/ansys/pyedb/discussions"
89
89
Releases = " https://github.com/ansys/pyedb/releases"
90
90
91
- [tool .black ]
92
- line-length = 88
93
-
94
- [tool .isort ]
95
- profile = " black"
96
- force_sort_within_sections = true
97
- default_section = " THIRDPARTY"
98
- src_paths = [" doc" , " src" , " tests" ]
91
+ [tool .ruff ]
92
+ line-length = 120
93
+ fix = true
94
+
95
+ [tool .ruff .format ]
96
+ quote-style = " double"
97
+ indent-style = " space"
98
+ docstring-code-format = true
99
+
100
+ [tool .ruff .lint ]
101
+ select = [
102
+ " D" , # pydocstyle, see https://docs.astral.sh/ruff/rules/#pydocstyle-d
103
+ " E" , # pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
104
+ " F" , # pyflakes, see https://docs.astral.sh/ruff/rules/#pyflakes-f
105
+ " I" , # isort, see https://docs.astral.sh/ruff/rules/#isort-i
106
+ " N" , # pep8-naming, see https://docs.astral.sh/ruff/rules/#pep8-naming-n
107
+ " PTH" , # flake8-use-pathlib, https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
108
+ " TD" , # flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td
109
+ " W" , # pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
110
+ ]
111
+ ignore = [
112
+ # "D" - pydocstyle, see https://docs.astral.sh/ruff/rules/#pydocstyle-d
113
+ " D100" , # undocumented-public-module
114
+ " D101" , # undocumented-public-class
115
+ " D102" , # undocumented-public-method
116
+ " D103" , # undocumented-public-function
117
+ " D104" , # undocumented-public-package
118
+ " D105" , # undocumented-magic-method
119
+ " D106" , # undocumented-public-nested-class
120
+ " D200" , # unnecessary-multiline-docstring
121
+ " D202" , # blank-line-after-function
122
+ " D205" , # missing-blank-line-after-summary
123
+ " D208" , # over-indentation
124
+ " D209" , # new-line-after-last-paragraph
125
+ " D210" , # surrounding-whitespace
126
+ " D214" , # overindented-section
127
+ " D215" , # overindented-section-underline
128
+ " D301" , # escape-sequence-in-docstring
129
+ " D400" , # missing-trailing-period
130
+ " D401" , # non-imperative-mood
131
+ " D403" , # first-word-uncapitalized
132
+ " D404" , # docstring-starts-with-this
133
+ " D405" , # non-capitalized-section-name
134
+ " D406" , # missing-new-line-after-section-name
135
+ " D407" , # missing-dashed-underline-after-section
136
+ " D409" , # mismatched-section-underline-length
137
+ " D410" , # no-blank-line-after-section
138
+ " D411" , # no-blank-line-before-section
139
+ " D412" , # blank-lines-between-header-and-content
140
+ " D414" , # empty-docstring-section
141
+ " D419" , # empty-docstring
142
+
143
+ # "E" - pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
144
+ " E402" , # module-import-not-at-top-of-file
145
+ " E711" , # none-comparison
146
+ " E712" , # true-false-comparison
147
+ " E713" , # not-in-test
148
+ " E721" , # type-comparison
149
+ " E722" , # bare-except
150
+ " E731" , # lambda-assignment
151
+ " E741" , # ambiguous-variable-name
152
+ " E743" , # ambiguous-function-name
153
+
154
+ # "F" - pyflakes, see https://docs.astral.sh/ruff/rules/#pyflakes-f
155
+ " F401" , # unused-import
156
+ " F523" , # string-dot-format-extra-positional-arguments
157
+ " F541" , # f-string-missing-placeholders
158
+ " F811" , # redefined-while-unused
159
+ " F821" , # undefined-name
160
+ " F841" , # unused-variable
161
+
162
+ # "N" - pep8-naming, see https://docs.astral.sh/ruff/rules/#pep8-naming-n
163
+ " N801" , # invalid-class-name
164
+ " N802" , # invalid-function-name
165
+ " N803" , # invalid-argument-name
166
+ " N806" , # non-lowercase-variable-in-function
167
+ " N812" , # lowercase-imported-as-non-lowercase
168
+ " N813" , # camelcase-imported-as-lowercase
169
+ " N815" , # mixed-case-variable-in-class-scope
170
+ " N816" , # mixed-case-variable-in-global-scope
171
+ " N817" , # camelcase-imported-as-acronym
172
+ " N818" , # error-suffix-on-exception-name
173
+ " N999" , # invalid-module-name
174
+
175
+ # "PTH" - flake8-use-pathlib, https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
176
+ " PTH100" , # os-path-abspath
177
+ " PTH101" , # os-chmod
178
+ " PTH102" , # os-mkdir
179
+ " PTH103" , # os-makedirs
180
+ " PTH104" , # os-rename
181
+ " PTH107" , # os-remove
182
+ " PTH108" , # os-unlink
183
+ " PTH110" , # os-path-exists
184
+ " PTH111" , # os-path-expanduser
185
+ " PTH112" , # os-path-isdir
186
+ " PTH113" , # os-path-isfile
187
+ " PTH116" , # os-stat
188
+ " PTH118" , # os-path-join
189
+ " PTH119" , # os-path-basename
190
+ " PTH120" , # os-path-dirname
191
+ " PTH122" , # os-path-splitext
192
+ " PTH123" , # builtin-open
193
+ " PTH202" , # os-path-getsize
194
+
195
+ # "TD" - flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td
196
+ " TD001" , # invalid-todo-tag
197
+ " TD002" , # missing-todo-author
198
+ " TD003" , # missing-todo-link
199
+ " TD004" , # missing-todo-colon
200
+ " TD005" , # missing-todo-description
201
+ " TD006" , # invalid-todo-capitalization
202
+
203
+ # "W" - pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
204
+ " W605" # invalid-escape-sequence
205
+ ]
206
+
207
+ [tool .ruff .lint .pydocstyle ]
208
+ # Use Numpy-style docstrings.
209
+ convention = " numpy"
210
+
211
+ [tool .ruff .lint .isort ]
212
+ force-sort-within-sections = true
213
+ known-first-party = [" doc" , " src" , " tests" ]
214
+ combine-as-imports = true
215
+
216
+ [tool .ruff .lint .mccabe ]
217
+ max-complexity = 10
99
218
100
219
[tool .codespell ]
101
220
skip = ' *.pyc,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,*.a3dcomp,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/source/examples/*,*cover,*.dat,*.mac,*.cdb,*.CDB,build,./factory/*,PKG-INFO,*.mypy_cache/*,./_unused/*,pyproject.toml'
0 commit comments