mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	gh-104050: Argument Clinic: annotate main() (#107192)
				
					
				
			This commit is contained in:
		
							parent
							
								
									837fa5c0cd
								
							
						
					
					
						commit
						db17529f80
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue