[clang-tools-extra] [clang-tidy] Add type annotations to add_new_check.py, fix minor bug (PR #106801)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 31 09:02:02 PDT 2024
================
@@ -8,21 +8,19 @@
#
# ===-----------------------------------------------------------------------===#
-from __future__ import print_function
-from __future__ import unicode_literals
-
import argparse
import io
import itertools
import os
import re
import sys
import textwrap
+from typing import Optional, Tuple
----------------
5chmidti wrote:
Please add a note here about `typings.Tuple` being deprecated in Python 3.9 and forward, but it looks like LLVM is still on Python >=3.8 (https://llvm.org/docs/GettingStarted.html#software) and the new way to write parameterized tuples is only available in 3.9+ (https://docs.python.org/3/library/typing.html#typing.Tuple)
https://github.com/llvm/llvm-project/pull/106801
More information about the cfe-commits
mailing list