[clang] [libclang/python] Add type annotations for code completion classes (PR #140539)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 06:25:40 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r HEAD~1...HEAD clang/bindings/python/clang/cindex.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- cindex.py 2025-05-19 13:23:14.000000 +0000
+++ cindex.py 2025-05-19 13:25:13.667147 +0000
@@ -2961,11 +2961,10 @@
}
class CompletionChunk:
class Kind:
-
def __init__(self, name: str):
self.name = name
def __str__(self) -> str:
return self.name
@@ -3053,11 +3052,10 @@
}
class CompletionString(ClangObject):
class Availability:
-
def __init__(self, name):
self.name = name
def __str__(self):
return self.name
@@ -3147,11 +3145,10 @@
return self.results[key]
class CodeCompletionResults(ClangObject):
-
def __init__(self, ptr: _Pointer[CCRStructure]):
assert isinstance(ptr, POINTER(CCRStructure)) and ptr
self.ptr = self._as_parameter_ = ptr
def from_param(self) -> _Pointer[CCRStructure]:
``````````
</details>
https://github.com/llvm/llvm-project/pull/140539
More information about the cfe-commits
mailing list