From 528963563256bf72763fcda06a0c38248d47c628 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Sun, 23 Jul 2023 18:30:29 +0100 Subject: [PATCH] Argument Clinic: annotate `main()` --- Tools/clinic/clinic.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index eecb81dcad5881..c9c57f1fdbb3b3 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -5591,7 +5591,7 @@ def state_terminal(self, line: str | None) -> None: clinic = None -def main(argv): +def main(argv: list[str]) -> None: import sys import argparse cmdline = argparse.ArgumentParser( @@ -5619,8 +5619,8 @@ def main(argv): print() cmdline.print_usage() sys.exit(-1) - converters = [] - return_converters = [] + converters: list[tuple[str, str]] = [] + return_converters: list[tuple[str, str]] = [] ignored = set(""" add_c_converter add_c_return_converter @@ -5716,4 +5716,5 @@ def main(argv): if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) + main(sys.argv[1:]) + sys.exit(0)