Skip to content

Commit a264e6a

Browse files
committed
feat(ruff): activate more linters
1 parent ccc4990 commit a264e6a

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737
- tomli
3838

3939
- repo: https://github.com/astral-sh/ruff-pre-commit
40-
rev: v0.14.14
40+
rev: v0.15.0
4141
hooks:
4242
- id: ruff-check
4343
args: [ --fix ]

ardupilot_methodic_configurator/mavftp_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def get_file(mav_ftp: mavftp.MAVFTP, remote_filename: str, local_filename: str,
139139
mav_ftp.cmd_get([remote_filename, local_filename])
140140
ret = mav_ftp.process_ftp_reply("OpenFileRO", timeout=timeout)
141141
ret.display_message()
142-
# mav_ftp.session = session # FIXME: this is a huge workaround hack # pylint: disable=fixme
143142
debug_class_member_variable_changes(mav_ftp)
144143
# time.sleep(0.2)
145144

pyproject.toml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,6 @@ exclude = [
178178

179179
# https://docs.astral.sh/ruff/rules/
180180
lint.select = [
181-
"F", # Pyflakes
182-
"E", # pycodestyle -Error
183-
"W", # pycodestyle - Warning
184-
"C90", # maccabe
185-
"I", # isort
186-
"N", # pep8-naming
187-
"D", # pydocstyle
188-
"UP", # pyupgrade
189181
#"ERA", # eradicate
190182
"YTT", # flake8-2020
191183
"ANN", # flake8-annotations
@@ -197,40 +189,56 @@ lint.select = [
197189
"A", # flake8-builtins
198190
"COM", # flake8-commas
199191
"C4", # flake8-comprehensions
192+
#"CPY", # flake8-copyright
200193
"DTZ", # flake8-datetimez
201194
"T10", # flake8-debugger
202195
"EM", # flake8-errmsg
203196
"EXE", # flake8-executable
204-
#"FIX", # flake8-fixme
197+
"FIX", # flake8-fixme
198+
"FA", # flake8-future-annotations
199+
"INT", # flake8-gettext
205200
"ISC", # flake8-implicit-str-concat
206201
"ICN", # flake8-import-conventions
207202
"LOG", # flake8-logging
208203
"G", # flake8-logging-format
209204
"INP", # flake8-no-pep420
210205
"PIE", # flake8-pie
211-
"T20", # flake8-print (T20)
212-
"PYI", # flake8-pyi (PYI)
213-
"PT", # flake8-pytest-style (PT)
214-
"Q", # flake8-quotes (Q)
215-
"RSE", # flake8-raise (RSE)
216-
"RET", # flake8-return (RET)
217-
"SLF", # flake8-self (SLF)
206+
"T20", # flake8-print
207+
"PYI", # flake8-pyi
208+
"PT", # flake8-pytest-style
209+
"Q", # flake8-quotes
210+
"RSE", # flake8-raise
211+
"RET", # flake8-return
212+
"SLF", # flake8-self
218213
"SIM", # flake8-simplify
219-
"SLOT", # flake8-slots (SLOT)
214+
"SLOT", # flake8-slots
220215
"TID", # flake8-tidy-imports
221-
#"TD", # flake8-todos
216+
"TD", # flake8-todos
222217
"TC", # flake8-type-checking
223218
"ARG", # flake8-unused-arguments
224219
#"PTH", # flake8-use-pathlib
225-
"INT", # flake8-gettext
220+
"FLY", # flynt
221+
"I", # isort
222+
"C90", # maccabe
223+
"NPY", # NumPy-specific rules
226224
"PD", # pandas-vet
225+
"N", # pep8-naming
226+
"PERF", # Performance-related issues
227+
"E", # pycodestyle -Error
228+
"W", # pycodestyle - Warning
229+
#"DOC", # pydoclint
230+
"D", # pydocstyle
231+
"F", # Pyflakes
227232
"PGH", # pygrep-hooks
228233
"PL", # Pylint
229-
"FLY", # flynt
230-
"PERF", # Performance-related issues
234+
"PLC", # Convention
235+
"PLE", # Error
236+
"PLR", # Refactor
237+
"PLW", # Warning
238+
"UP", # pyupgrade
231239
"FURB", # refurb
232-
"DOC", # pydoclint
233240
"RUF", # Ruff-specific codes
241+
#"TRY", # tryceratops
234242
]
235243

236244
lint.ignore = [
@@ -248,6 +256,8 @@ lint.ignore = [
248256
"FBT001", # Boolean-typed positional argument in function definition
249257
"FBT002", # Boolean default positional argument in function definition
250258
"LOG015", # `error()` call on root logger, Use own logger instead
259+
"FA100", # Add `from __future__ import annotations` to simplify xxx
260+
"TRY400", # Use logging.exception instead of logging.error
251261
]
252262

253263
line-length = 127

0 commit comments

Comments
 (0)