Skip to content

Commit 359b9b8

Browse files
committed
style: apply ruff formatting fixes
Apply the formatter changes required by pre-commit.ci so the docs helper updates match repository formatting rules. Made-with: Cursor
1 parent 5d9d37b commit 359b9b8

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

cuda_bindings/docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"cufile": ("https://docs.nvidia.com/gpudirect-storage/api-reference-guide/", None),
109109
}
110110

111+
111112
def _sanitize_generated_docstring(lines):
112113
doc_lines = inspect.cleandoc("\n".join(lines)).splitlines()
113114
if not doc_lines:
@@ -139,6 +140,7 @@ def rewrite_source(app, docname, source):
139140

140141
source[0] = text
141142

143+
142144
suppress_warnings = [
143145
# for warnings about multiple possible targets, see NVIDIA/cuda-python#152
144146
"ref.python",

cuda_python/docs/exts/enum_documenter.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ def can_document_member(cls, member, _membername, _isattr, _parent):
2222
def get_doc(self):
2323
docs = super().get_doc()
2424

25-
if (
26-
docs
27-
and self.object.__module__ == "cuda.bindings.nvml"
28-
and self.object.__name__ == "GpmMetricId"
29-
):
25+
if docs and self.object.__module__ == "cuda.bindings.nvml" and self.object.__name__ == "GpmMetricId":
3026
return [["GPM Metric Identifiers.", "", "See ``nvmlGpmMetricId_t``."]]
3127

3228
return docs

0 commit comments

Comments
 (0)