gh-104050: Argument Clinic: annotate main() (#107192)

This commit is contained in:
Alex Waygood 2023-07-24 20:32:38 +01:00 committed by GitHub
parent 837fa5c0cd
commit db17529f80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5591,7 +5591,7 @@ parsers: dict[str, Callable[[Clinic], Parser]] = {
clinic = None clinic = None
def main(argv): def main(argv: list[str]) -> None:
import sys import sys
import argparse import argparse
cmdline = argparse.ArgumentParser( cmdline = argparse.ArgumentParser(
@ -5619,8 +5619,8 @@ For more information see https://docs.python.org/3/howto/clinic.html""")
print() print()
cmdline.print_usage() cmdline.print_usage()
sys.exit(-1) sys.exit(-1)
converters = [] converters: list[tuple[str, str]] = []
return_converters = [] return_converters: list[tuple[str, str]] = []
ignored = set(""" ignored = set("""
add_c_converter add_c_converter
add_c_return_converter add_c_return_converter
@ -5716,4 +5716,5 @@ For more information see https://docs.python.org/3/howto/clinic.html""")
if __name__ == "__main__": if __name__ == "__main__":
sys.exit(main(sys.argv[1:])) main(sys.argv[1:])
sys.exit(0)