Skip to content

Commit 8a4b120

Browse files
committed
add linting
1 parent 87039dc commit 8a4b120

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Tools/cpuinfo/.ruff.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Python 3.12 is required for 'type' statements
2+
target-version = "py312"
3+
line-length = 79
4+
5+
[format]
6+
skip-magic-trailing-comma = false
7+
8+
[lint]
9+
select = [
10+
"I", # isort
11+
"F841", # unused variable
12+
"RUF100", # Ban unused `# noqa` comments
13+
"PGH004", # Ban blanket `# noqa` comments (only ignore specific error codes)
14+
]
15+
16+

Tools/cpuinfo/mypy.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[mypy]
2+
files = Tools/cpuinfo/
3+
pretty = True
4+
5+
python_version = 3.12
6+
strict = True
7+
extra_checks = True
8+
enable_error_code = ignore-without-code,redundant-expr,truthy-bool
9+
warn_unreachable = True

0 commit comments

Comments
 (0)