You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
main.py's usage line implies --exit-after-create can be given without a grid size #67
main.py:26 prints Usage: python main.py [gridSize] [--exit-after-create]. With both arguments shown as independently optional, python main.py --exit-after-create looks valid. parseArgs (main.py:43-65) reads the flag only as the second argument, so given first it is parsed as a grid size: Invalid grid size argument, using default of 50. is printed, a 50x50 environment is created (or loaded), and the render loop is entered instead of exiting.
This behaviour is characterized by tests/test_main.py::TestParseArgs::test_the_flag_given_first_is_read_as_an_invalid_grid_size and documented in the README by PR #66.
Possible directions
Nest the brackets in the usage line, for example [gridSize [--exit-after-create]], so the flag is shown as following a grid size.
Recognise --exit-after-create in any position, as --help already is, and drop the positional rule from the README.
Acceptance criteria
The usage line and parseArgs agree on where the flag may appear.
The README's Running section and the TestParseArgs tests are updated to match.
Activity