Skip to content

Move error handling to main function#13630

Merged
srittau merged 2 commits intopython:mainfrom
srittau:stubtest-error-handling
Mar 16, 2025
Merged

Move error handling to main function#13630
srittau merged 2 commits intopython:mainfrom
srittau:stubtest-error-handling

Conversation

@srittau
Copy link
Copy Markdown
Collaborator

@srittau srittau commented Mar 16, 2025

  • This makes is easier to call run_stubtest() manually, for example when testing the script - no need to construct an ArgumentParser instance.
  • This concentrates argument error handling in the main() function and prevents an unexpected process exit when calling run_stubtest().

srittau and others added 2 commits March 16, 2025 12:08
* This makes is easier to call `run_stubtest()` manually, for
   example when testing the script - no need to construct
   an `ArgumentParser` instance.
* This concentrates argument error handling in the
  `main()` function and prevents an unexpected process exit
  when calling `run_stubtest()`.
@srittau srittau merged commit da50b5c into python:main Mar 16, 2025
58 checks passed
@srittau srittau deleted the stubtest-error-handling branch March 16, 2025 19:40
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
* This makes is easier to call `run_stubtest()` manually, for
   example when testing the script - no need to construct
   an `ArgumentParser` instance.
* This concentrates argument error handling in the
  `main()` function and prevents an unexpected process exit
  when calling `run_stubtest()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants