================
@@ -15,6 +15,7 @@
import re
import sys
import textwrap
+from operator import methodcaller
# FIXME Python 3.9: Replace typing.Tuple with builtins.tuple.
----------------
vbvictor wrote:
Yes it can, but since we don't have anything in CI, its better to preserve
comments
```
$ ruff check --select UP006 add_new_check.py
UP006 [*] Use `tuple` instead of `Tuple` for type annotation
--> add_new_check.py:507:31
|
505 | return ""
506 |
507 | def process_doc(doc_file: Tuple[str, str]) -> Tuple[str,
Optional[Match[str]]]:
| ^^^^^
508 | check_name = doc_file[0] + "-" + doc_file[1].replace(".rst", "")
|
help: Replace with `tuple`
UP006 [*] Use `tuple` instead of `Tuple` for type annotation
--> add_new_check.py:507:51
|
505 | return ""
506 |
507 | def process_doc(doc_file: Tuple[str, str]) -> Tuple[str,
Optional[Match[str]]]:
| ^^^^^
508 | check_name = doc_file[0] + "-" + doc_file[1].replace(".rst", "")
|
help: Replace with `tuple`
UP006 [*] Use `tuple` instead of `Tuple` for type annotation
--> add_new_check.py:522:31
|
520 | return check_name, match
521 |
522 | def format_link(doc_file: Tuple[str, str]) -> str:
| ^^^^^
523 | check_name, match = process_doc(doc_file)
524 | if not match and check_name and not
check_name.startswith("clang-analyzer-"):
|
help: Replace with `tuple`
UP006 [*] Use `tuple` instead of `Tuple` for type annotation
--> add_new_check.py:534:37
|
532 | return ""
533 |
534 | def format_link_alias(doc_file: Tuple[str, str]) -> str:
| ^^^^^
535 | check_name, match = process_doc(doc_file)
536 | if (match or (check_name.startswith("clang-analyzer-"))) and
check_name:
|
help: Replace with `tuple`
Found 4 errors.
[*] 4 fixable with the `--fix` option.
```
https://github.com/llvm/llvm-project/pull/176927
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits