https://github.com/nicovank created 
https://github.com/llvm/llvm-project/pull/151873


This script passes
```
python3 -m mypy --strict clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
```

`args` and `kwargs` can be typed with what we expect for a single argument. In 
this case, since we forward to `print`, `Any` seems best.


>From a91e85244e1ed4a3e22afe2d4db465ba4bfe6838 Mon Sep 17 00:00:00 2001
From: Nicolas van Kempen <[email protected]>
Date: Sun, 3 Aug 2025 11:55:00 -0400
Subject: [PATCH] [NFC][run-clang-tidy] Add minor type hints

This script passes
```
python3 -m mypy --strict clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
```

`args` and `kwargs` can be typed with what we expect for a single argument. In 
this case, since we forward to `print`, `Any` seems best.
---
 clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py 
b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
index d307b26ea0d34..80f1766b0bf10 100755
--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -236,7 +236,7 @@ def print_profile_data(aggregated_data: Dict[str, float]) 
-> None:
         checkers.items(), key=lambda x: x[1]["user"] + x[1]["sys"], 
reverse=True
     )
 
-    def print_stderr(*args, **kwargs) -> None:
+    def print_stderr(*args: Any, **kwargs: Any) -> None:
         print(*args, file=sys.stderr, **kwargs)
 
     print_stderr(

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to