-
Notifications
You must be signed in to change notification settings - Fork 247
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (135 loc) · 3.36 KB
/
pyproject.toml
File metadata and controls
144 lines (135 loc) · 3.36 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
[tool.codespell]
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
# this is only to allow you to run codespell interactively
skip = "./.git,./build,./python/_skbuild/,.*egg-info.*,./.mypy_cache,./pyproject.toml,./cpp/benchmarks/utilities/cxxopts.hpp"
# ignore short words, and typename parameters like OffsetT
ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b"
ignore-words-list = "thirdparty,couldn"
builtin = "clear"
quiet-level = 3
[tool.ruff]
line-length = 79
target-version = "py311"
[tool.ruff.lint]
select = [
# pycodestyle Error
"E",
# Pyflakes
"F",
# pycodestyle Warning
"W",
# isort
"I",
# no-blank-line-before-function
"D201",
# one-blank-line-after-class
"D204",
# indent-with-spaces
"D206",
# under-indentation
"D207",
# over-indentation
"D208",
# new-line-after-last-paragraph
"D209",
# surrounding-whitespace
"D210",
# blank-line-before-class
"D211",
# section-not-over-indented
"D214",
# section-underline-not-over-indented
"D215",
# triple-single-quotes
"D300",
# escape-sequence-in-docstring
"D301",
# first-line-capitalized
"D403",
# capitalize-section-name
"D405",
# new-line-after-section-name
"D406",
# dashed-underline-after-section
"D407",
# section-underline-after-name
"D408",
# section-underline-matches-section-length
"D409",
# no-blank-line-after-section
"D410",
# no-blank-line-before-section
"D411",
# blank-lines-between-header-and-content
"D412",
# empty-docstring-section
"D414",
# overload-with-docstring
"D418",
# flake8-type-checking
"TCH",
# flake8-future-annotations
"FA",
# non-pep585-annotation
"UP006",
# non-pep604-annotation
"UP007",
# Import from `collections.abc` instead: `Callable`
"UP035",
# usage of legacy `np.random` function calls
"NPY002",
# Ruff-specific rules
"RUF",
]
ignore = [
# whitespace before :
"E203",
# line-too-long (due to Copyright header)
"E501",
# type-comparison, disabled because we compare types to numpy dtypes
"E721",
# String contains ambiguous character
"RUF001",
# Parenthesize `a and b` expressions when chaining `and` and `or`
# together, to make the precedence clear
"RUF021",
# Mutable class attributes should be annotated with
# `typing.ClassVar`
"RUF012",
]
fixable = ["ALL"]
exclude = [
# TODO: Remove this in a follow-up where we fix __all__.
"__init__.py",
]
[tool.mypy]
# Start with minimal strictness for gradual adoption
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
# But enforce some basic quality checks
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
python_version = "3.12"
[[tool.mypy.overrides]]
module = [
"cuda.bindings.*",
"cuda.core.*",
"cupy.*",
"numba.*",
"torch.*",
"rmm.librmm.*",
"librmm"
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "test_helpers"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "rmm.tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false