-
Notifications
You must be signed in to change notification settings - Fork 31
/
pyproject.toml
81 lines (74 loc) · 2.71 KB
/
pyproject.toml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[tool.codespell]
skip = "_deps,build*,.cache,html,_build,_static,generated,latex,install*,.git,xml,vale"
ignore-words-list = "bu,dne,nd,thirdparty,unexpect"
[tool.ruff]
exclude = [
"_build",
"_deps",
"_static",
"build*",
".cache",
"html",
"generated",
"latex",
"install*",
".git",
"xml"
]
line-length = 100
fix = false # don't automatically apply fixes (can override with ruff --fix)
target-version = "py39"
[tool.ruff.lint]
# see: https://docs.astral.sh/ruff/rules/
select = [
"E", # Pyflakes
"W", # Pyflakes
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"SIM", # flake8-simplify
"B", # flake8-bugbear
"A", # flake8-builtins (avoid shadowing of Python builtins)
"N", # pep8-naming (enforce pep8 naming conventions)
"YTT", # flake8-2020 (check for misuse of sys.version or sys.version_info)
"ICN", # flake8-import-conventions (e.g. enforce importing numpy as np)
"T10", # flake8-debugger (ensure no leftover trace/breakpoint commands)
"PT", # flake8-pytest-style
"FIX", # flake8-fixme (warn on leftover TODO statements)
"NPY", # numpy-specific rules
"PERF", # performance related rules
]
fixable = ["ALL"] # list of rule codes or prefixes to consider fixable
ignore = [
"PT006" # don't enforce csv vs. list vs. tuple for first argument of parametrize
]
[tool.ruff.lint.per-file-ignores]
# ignore line length for __init__.py files (due to copyright header not in triple quotes)
# (For API documentation, the __init__.py files need sphinx autosummary commands in the first
# triple quote comment block, so the copyright header is commented as individual lines)
"python/holoscan/**/__init__.py" = ["E501"]
"python/holoscan/decorator.py" = ["E402"]
"scripts/gxf_entity_codec.py" = ["N815"] # allow mixed-case enum names in this utility script
[tool.ruff.lint.isort]
known-first-party = ["holoscan"]
combine-as-imports = false
force-single-line = false
order-by-type = true
[tool.ruff.lint.flake8-import-conventions.aliases]
# Declare the default aliases.
cupy = "cp"
numpy = "np"