forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.ruff.toml
More file actions
55 lines (45 loc) · 1.7 KB
/
Copy path.ruff.toml
File metadata and controls
55 lines (45 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright (c) 2024 Basalte bv
# SPDX-License-Identifier: Apache-2.0
extend = ".ruff-excludes.toml"
line-length = 100
target-version = "py312"
[lint]
select = [
# zephyr-keep-sorted-start
"B", # flake8-bugbear
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"SIM", # flake8-simplify
"TID251", # flake8-tidy-imports: banned-api (deprecated west APIs)
"UP", # pyupgrade
"W", # pycodestyle warnings
# zephyr-keep-sorted-stop
]
ignore = [
# zephyr-keep-sorted-start
"SIM108", # Allow if-else blocks instead of forcing ternary operator
# zephyr-keep-sorted-stop
]
[lint.flake8-tidy-imports.banned-api]
# Deprecated west APIs.
"west.log".msg = """\
west.log is deprecated; use logging.getLogger(__name__) \
and bridge to the command via forward_logging_to_west() \
from scripts/west_commands/build_helpers.py. \
See details in https://github.com/zephyrproject-rtos/west/issues/952"""
"west.configuration.config".msg = """\
The west.configuration `config` module-level global is deprecated; \
use the Configuration class (typically `self.config` inside a WestCommand)."""
"west.configuration.read_config".msg = """\
west.configuration.read_config is deprecated; \
instantiate Configuration(topdir=...) and use its get method."""
"west.configuration.update_config".msg = """\
west.configuration.update_config is deprecated; \
instantiate Configuration(topdir=...) and use its set method."""
"west.configuration.delete_config".msg = """\
west.configuration.delete_config is deprecated; \
instantiate Configuration(topdir=...) and use its delete method."""
[format]
quote-style = "preserve"
line-ending = "lf"