{{ message }}
Move --batch branches out of main.py#1769
Merged
rolandwalker merged 1 commit intomainfrom Apr 3, 2026
Merged
Conversation
4f45b3d to
08ef89b
Compare
3 tasks
scottnemes
approved these changes
Apr 3, 2026
creating a main_modes directory, into which other modes can be moved. It might be considered very rough to pass the entire MyCli and CliArgs instances as arguments, but this is at least a step to breaking up the large main.py file into logical sections. Some comments regarding statement count were removed, exceptions are handled differently, and better care is taken to close a filehandle, but no functional change is intended. Relevant tests are moved to test/pytests/test_main_modes_batch.py, and new tests are added for greater coverage.
08ef89b to
38f03dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Move
--batchbranches out ofmain.py, creating amain_modesdirectory, into which other modes can be moved.It might be considered very rough to pass the entire
MyCliandCliArgsinstances as arguments, but this is at least a step to breaking up the largemain.pyfile into logical sections.Some comments regarding statement count were removed, and exceptions are handled differently, but no functional change is intended.
Relevant tests are moved to
test/pytests/test_main_modes_batch.py, and new tests are added for greater coverage.main_modes/might not be the best name.main_dispatch? I didn't want to write outmain_execution_paths.Checklist
changelog.mdfile.AUTHORSfile (or it's already there).