forked from rapidsai/cudf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
169 lines (160 loc) · 4.61 KB
/
pyproject.toml
File metadata and controls
169 lines (160 loc) · 4.61 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
[tool.mypy]
ignore_missing_imports = true
ignore_errors = false
enable_error_code = "ignore-without-code"
warn_unused_ignores = true
exclude = [
"cudf/_lib/",
"cudf/cudf/tests/",
"custreamz/custreamz/tests/",
"dask_cudf/dask_cudf/tests/",
]
[[tool.mypy.overrides]]
module = ["cudf.core.column.*"]
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = ["cudf_polars.*"]
disallow_untyped_defs = true
follow_imports = "normal"
ignore_missing_imports = false
[[tool.mypy.overrides]]
module = ["polars.*"]
# override the global "skip" above so that types from polars
# aren't skipped and assumed to be `Any`.
follow_imports = "normal"
[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,./.github,./cpp/build,.*egg-info.*,./.mypy_cache,./cpp/tests,./python/cudf/cudf/tests,./java/src/test,./cpp/include/cudf_test/cxxopts.hpp"
# ignore short words, and typename parameters like OffsetT
ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b"
ignore-words-list = "inout,unparseable,falsy,couldn,Couldn,thirdparty,womens"
builtin = "clear"
quiet-level = 3
[tool.ruff]
line-length = 79
target-version = "py311"
[tool.ruff.lint]
typing-modules = ["cudf._typing"]
select = [
# pycodestyle Error
"E",
# Pyflakes
"F",
# pycodestyle Warning
"W",
# isort
"I",
# zip-without-explicit-strict
"B905",
# 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",
# banned-api
"TID251",
# flake8-debugger
"T10",
# #flake8-print
"T20"
]
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 = [
"cpp/scripts/gdb-pretty-printers.py",
]
extend-unsafe-fixes = [
# zip-without-explicit-strict's autofix sets strict to False, but we want to enforce True
"B905",
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"numpy.can_cast".msg = "Use find_common_dtype from cudf.utils.dtypes instead"
"numpy.result_type".msg = "Use find_common_dtype from cudf.utils.dtypes instead"
"numpy.issubdtype".msg = "Check the .kind attributes on dtype objects instead"
"pandas.api.types".msg = "Use cudf.api.types instead"
[tool.ruff.lint.per-file-ignores]
# We use "== None" to demonstrate null handling in this notebook
"docs/cudf/source/user_guide/missing-data.ipynb" = ["E711"]
# We demonstrate UDFs where numba doesn't support `zip(..., strict=True)` (or
# any keywords) and we don't want to litter demo notebooks with noqas
"docs/cudf/source/user_guide/guide-to-udfs.ipynb" = ["B905"]
# Lots of pytest implicitly injected attributes in conftest-patch.py
"python/cudf/cudf/pandas/scripts/conftest-patch.py" = ["F821"]
"python/cudf/cudf/pandas/scripts/*" = ["D"]
"python/cudf/cudf_pandas_tests/*" = ["D"]
"ci/*" = ["T201"]
"docs/*" = ["T201"]
"cpp/*" = ["T201"]