[clang] [clang][Python] Apply type annotations to Python (PR #173845)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 12 04:45:31 PST 2026
================
@@ -142,7 +149,9 @@ def value(self) -> str | None: # type: ignore [override]
return val.decode("utf8")
@classmethod
- def from_param(cls, param: str | bytes | None) -> c_interop_string:
+ def from_param(
+ cls: TType["c_interop_string"], param: str | bytes | None
+ ) -> c_interop_string:
----------------
Endilll wrote:
Who benefits from annotating `cls` on a class method? This makes the prototype longer and more cluttered without bringing any new information. Not to say that we don't need more usages of the confusing `TType` thing (the confusion itself is not your fault by any means, though).
https://github.com/llvm/llvm-project/pull/173845
More information about the cfe-commits
mailing list