cmd2 2.4.3__tar.gz → 2.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. cmd2-2.5.1/.readthedocs.yaml +34 -0
  2. {cmd2-2.4.3 → cmd2-2.5.1}/CHANGELOG.md +42 -17
  3. {cmd2-2.4.3 → cmd2-2.5.1}/LICENSE +1 -1
  4. {cmd2-2.4.3/cmd2.egg-info → cmd2-2.5.1}/PKG-INFO +47 -17
  5. cmd2-2.5.1/Pipfile +33 -0
  6. {cmd2-2.4.3 → cmd2-2.5.1}/README.md +10 -10
  7. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/__init__.py +2 -6
  8. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/ansi.py +16 -13
  9. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/argparse_completer.py +1 -10
  10. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/argparse_custom.py +12 -53
  11. cmd2-2.5.1/cmd2/clipboard.py +25 -0
  12. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/cmd2.py +543 -236
  13. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/command_definition.py +10 -0
  14. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/decorators.py +90 -64
  15. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/exceptions.py +0 -1
  16. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/history.py +48 -19
  17. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/parsing.py +36 -30
  18. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/plugin.py +8 -6
  19. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/py_bridge.py +14 -3
  20. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/rl_utils.py +57 -23
  21. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/table_creator.py +1 -0
  22. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/transcript.py +3 -2
  23. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/utils.py +39 -5
  24. {cmd2-2.4.3 → cmd2-2.5.1/cmd2.egg-info}/PKG-INFO +47 -17
  25. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2.egg-info/SOURCES.txt +105 -1
  26. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2.egg-info/requires.txt +14 -12
  27. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/cmd.rst +13 -1
  28. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/utils.rst +3 -0
  29. {cmd2-2.4.3 → cmd2-2.5.1}/docs/conf.py +19 -19
  30. {cmd2-2.4.3 → cmd2-2.5.1}/docs/doc_conventions.rst +2 -2
  31. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/argument_processing.rst +0 -8
  32. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/builtin_commands.rst +15 -14
  33. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/clipboard.rst +8 -0
  34. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/commands.rst +1 -3
  35. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/help.rst +1 -1
  36. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/hooks.rst +3 -3
  37. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/initialization.rst +11 -7
  38. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/multiline_commands.rst +1 -1
  39. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/prompt.rst +10 -6
  40. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/scripting.rst +33 -33
  41. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/settings.rst +15 -1
  42. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/transcripts.rst +4 -4
  43. {cmd2-2.4.3 → cmd2-2.5.1}/docs/migrating/why.rst +1 -1
  44. {cmd2-2.4.3 → cmd2-2.5.1}/docs/overview/installation.rst +2 -2
  45. cmd2-2.5.1/docs/requirements.txt +8 -0
  46. {cmd2-2.4.3 → cmd2-2.5.1}/docs/testing.rst +1 -1
  47. cmd2-2.5.1/examples/.mypy_cache/3.12/@plugins_snapshot.json +1 -0
  48. cmd2-2.5.1/examples/.mypy_cache/3.12/_ast.data.json +1 -0
  49. cmd2-2.5.1/examples/.mypy_cache/3.12/_ast.meta.json +1 -0
  50. cmd2-2.5.1/examples/.mypy_cache/3.12/_codecs.data.json +1 -0
  51. cmd2-2.5.1/examples/.mypy_cache/3.12/_codecs.meta.json +1 -0
  52. cmd2-2.5.1/examples/.mypy_cache/3.12/_collections_abc.data.json +1 -0
  53. cmd2-2.5.1/examples/.mypy_cache/3.12/_collections_abc.meta.json +1 -0
  54. cmd2-2.5.1/examples/.mypy_cache/3.12/_typeshed/__init__.data.json +1 -0
  55. cmd2-2.5.1/examples/.mypy_cache/3.12/_typeshed/__init__.meta.json +1 -0
  56. cmd2-2.5.1/examples/.mypy_cache/3.12/_typeshed/importlib.data.json +1 -0
  57. cmd2-2.5.1/examples/.mypy_cache/3.12/_typeshed/importlib.meta.json +1 -0
  58. cmd2-2.5.1/examples/.mypy_cache/3.12/abc.data.json +1 -0
  59. cmd2-2.5.1/examples/.mypy_cache/3.12/abc.meta.json +1 -0
  60. cmd2-2.5.1/examples/.mypy_cache/3.12/argparse.data.json +1 -0
  61. cmd2-2.5.1/examples/.mypy_cache/3.12/argparse.meta.json +1 -0
  62. cmd2-2.5.1/examples/.mypy_cache/3.12/builtins.data.json +1 -0
  63. cmd2-2.5.1/examples/.mypy_cache/3.12/builtins.meta.json +1 -0
  64. cmd2-2.5.1/examples/.mypy_cache/3.12/codecs.data.json +1 -0
  65. cmd2-2.5.1/examples/.mypy_cache/3.12/codecs.meta.json +1 -0
  66. cmd2-2.5.1/examples/.mypy_cache/3.12/collections/__init__.data.json +1 -0
  67. cmd2-2.5.1/examples/.mypy_cache/3.12/collections/__init__.meta.json +1 -0
  68. cmd2-2.5.1/examples/.mypy_cache/3.12/collections/abc.data.json +1 -0
  69. cmd2-2.5.1/examples/.mypy_cache/3.12/collections/abc.meta.json +1 -0
  70. cmd2-2.5.1/examples/.mypy_cache/3.12/contextlib.data.json +1 -0
  71. cmd2-2.5.1/examples/.mypy_cache/3.12/contextlib.meta.json +1 -0
  72. cmd2-2.5.1/examples/.mypy_cache/3.12/dataclasses.data.json +1 -0
  73. cmd2-2.5.1/examples/.mypy_cache/3.12/dataclasses.meta.json +1 -0
  74. cmd2-2.5.1/examples/.mypy_cache/3.12/email/__init__.data.json +1 -0
  75. cmd2-2.5.1/examples/.mypy_cache/3.12/email/__init__.meta.json +1 -0
  76. cmd2-2.5.1/examples/.mypy_cache/3.12/email/_policybase.data.json +1 -0
  77. cmd2-2.5.1/examples/.mypy_cache/3.12/email/_policybase.meta.json +1 -0
  78. cmd2-2.5.1/examples/.mypy_cache/3.12/email/charset.data.json +1 -0
  79. cmd2-2.5.1/examples/.mypy_cache/3.12/email/charset.meta.json +1 -0
  80. cmd2-2.5.1/examples/.mypy_cache/3.12/email/contentmanager.data.json +1 -0
  81. cmd2-2.5.1/examples/.mypy_cache/3.12/email/contentmanager.meta.json +1 -0
  82. cmd2-2.5.1/examples/.mypy_cache/3.12/email/errors.data.json +1 -0
  83. cmd2-2.5.1/examples/.mypy_cache/3.12/email/errors.meta.json +1 -0
  84. cmd2-2.5.1/examples/.mypy_cache/3.12/email/header.data.json +1 -0
  85. cmd2-2.5.1/examples/.mypy_cache/3.12/email/header.meta.json +1 -0
  86. cmd2-2.5.1/examples/.mypy_cache/3.12/email/message.data.json +1 -0
  87. cmd2-2.5.1/examples/.mypy_cache/3.12/email/message.meta.json +1 -0
  88. cmd2-2.5.1/examples/.mypy_cache/3.12/email/policy.data.json +1 -0
  89. cmd2-2.5.1/examples/.mypy_cache/3.12/email/policy.meta.json +1 -0
  90. cmd2-2.5.1/examples/.mypy_cache/3.12/enum.data.json +1 -0
  91. cmd2-2.5.1/examples/.mypy_cache/3.12/enum.meta.json +1 -0
  92. cmd2-2.5.1/examples/.mypy_cache/3.12/genericpath.data.json +1 -0
  93. cmd2-2.5.1/examples/.mypy_cache/3.12/genericpath.meta.json +1 -0
  94. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/__init__.data.json +1 -0
  95. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/__init__.meta.json +1 -0
  96. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/_abc.data.json +1 -0
  97. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/_abc.meta.json +1 -0
  98. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/abc.data.json +1 -0
  99. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/abc.meta.json +1 -0
  100. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/machinery.data.json +1 -0
  101. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/machinery.meta.json +1 -0
  102. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/metadata/__init__.data.json +1 -0
  103. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/metadata/__init__.meta.json +1 -0
  104. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/metadata/_meta.data.json +1 -0
  105. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/metadata/_meta.meta.json +1 -0
  106. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/readers.data.json +1 -0
  107. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/readers.meta.json +1 -0
  108. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/resources/__init__.data.json +1 -0
  109. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/resources/__init__.meta.json +1 -0
  110. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/resources/abc.data.json +1 -0
  111. cmd2-2.5.1/examples/.mypy_cache/3.12/importlib/resources/abc.meta.json +1 -0
  112. cmd2-2.5.1/examples/.mypy_cache/3.12/io.data.json +1 -0
  113. cmd2-2.5.1/examples/.mypy_cache/3.12/io.meta.json +1 -0
  114. cmd2-2.5.1/examples/.mypy_cache/3.12/os/__init__.data.json +1 -0
  115. cmd2-2.5.1/examples/.mypy_cache/3.12/os/__init__.meta.json +1 -0
  116. cmd2-2.5.1/examples/.mypy_cache/3.12/os/path.data.json +1 -0
  117. cmd2-2.5.1/examples/.mypy_cache/3.12/os/path.meta.json +1 -0
  118. cmd2-2.5.1/examples/.mypy_cache/3.12/pathlib.data.json +1 -0
  119. cmd2-2.5.1/examples/.mypy_cache/3.12/pathlib.meta.json +1 -0
  120. cmd2-2.5.1/examples/.mypy_cache/3.12/posixpath.data.json +1 -0
  121. cmd2-2.5.1/examples/.mypy_cache/3.12/posixpath.meta.json +1 -0
  122. cmd2-2.5.1/examples/.mypy_cache/3.12/re.data.json +1 -0
  123. cmd2-2.5.1/examples/.mypy_cache/3.12/re.meta.json +1 -0
  124. cmd2-2.5.1/examples/.mypy_cache/3.12/resource.data.json +1 -0
  125. cmd2-2.5.1/examples/.mypy_cache/3.12/resource.meta.json +1 -0
  126. cmd2-2.5.1/examples/.mypy_cache/3.12/sre_compile.data.json +1 -0
  127. cmd2-2.5.1/examples/.mypy_cache/3.12/sre_compile.meta.json +1 -0
  128. cmd2-2.5.1/examples/.mypy_cache/3.12/sre_constants.data.json +1 -0
  129. cmd2-2.5.1/examples/.mypy_cache/3.12/sre_constants.meta.json +1 -0
  130. cmd2-2.5.1/examples/.mypy_cache/3.12/sre_parse.data.json +1 -0
  131. cmd2-2.5.1/examples/.mypy_cache/3.12/sre_parse.meta.json +1 -0
  132. cmd2-2.5.1/examples/.mypy_cache/3.12/subprocess.data.json +1 -0
  133. cmd2-2.5.1/examples/.mypy_cache/3.12/subprocess.meta.json +1 -0
  134. cmd2-2.5.1/examples/.mypy_cache/3.12/sys/__init__.data.json +1 -0
  135. cmd2-2.5.1/examples/.mypy_cache/3.12/sys/__init__.meta.json +1 -0
  136. cmd2-2.5.1/examples/.mypy_cache/3.12/sys/_monitoring.data.json +1 -0
  137. cmd2-2.5.1/examples/.mypy_cache/3.12/sys/_monitoring.meta.json +1 -0
  138. cmd2-2.5.1/examples/.mypy_cache/3.12/types.data.json +1 -0
  139. cmd2-2.5.1/examples/.mypy_cache/3.12/types.meta.json +1 -0
  140. cmd2-2.5.1/examples/.mypy_cache/3.12/typing.data.json +1 -0
  141. cmd2-2.5.1/examples/.mypy_cache/3.12/typing.meta.json +1 -0
  142. cmd2-2.5.1/examples/.mypy_cache/3.12/typing_extensions.data.json +1 -0
  143. cmd2-2.5.1/examples/.mypy_cache/3.12/typing_extensions.meta.json +1 -0
  144. cmd2-2.5.1/examples/.mypy_cache/3.12/zipfile/__init__.data.json +1 -0
  145. cmd2-2.5.1/examples/.mypy_cache/3.12/zipfile/__init__.meta.json +1 -0
  146. cmd2-2.5.1/examples/.mypy_cache/3.12/zipfile/_path.data.json +1 -0
  147. cmd2-2.5.1/examples/.mypy_cache/3.12/zipfile/_path.meta.json +1 -0
  148. cmd2-2.5.1/examples/.mypy_cache/CACHEDIR.TAG +3 -0
  149. {cmd2-2.4.3 → cmd2-2.5.1}/examples/alias_startup.py +3 -2
  150. {cmd2-2.4.3 → cmd2-2.5.1}/examples/arg_decorators.py +1 -0
  151. {cmd2-2.4.3 → cmd2-2.5.1}/examples/argparse_completion.py +1 -2
  152. {cmd2-2.4.3 → cmd2-2.5.1}/examples/async_printing.py +8 -5
  153. {cmd2-2.4.3 → cmd2-2.5.1}/examples/basic.py +7 -6
  154. {cmd2-2.4.3 → cmd2-2.5.1}/examples/basic_completion.py +1 -0
  155. cmd2-2.5.1/examples/cmd2_history.dat +0 -0
  156. {cmd2-2.4.3 → cmd2-2.5.1}/examples/colors.py +1 -1
  157. {cmd2-2.4.3 → cmd2-2.5.1}/examples/custom_parser.py +1 -0
  158. {cmd2-2.4.3 → cmd2-2.5.1}/examples/decorator_example.py +1 -0
  159. {cmd2-2.4.3 → cmd2-2.5.1}/examples/default_categories.py +0 -0
  160. {cmd2-2.4.3 → cmd2-2.5.1}/examples/dynamic_commands.py +2 -2
  161. {cmd2-2.4.3 → cmd2-2.5.1}/examples/environment.py +1 -0
  162. {cmd2-2.4.3 → cmd2-2.5.1}/examples/event_loops.py +1 -0
  163. {cmd2-2.4.3 → cmd2-2.5.1}/examples/example.py +1 -0
  164. {cmd2-2.4.3 → cmd2-2.5.1}/examples/exit_code.py +2 -2
  165. {cmd2-2.4.3 → cmd2-2.5.1}/examples/hello_cmd2.py +1 -0
  166. {cmd2-2.4.3 → cmd2-2.5.1}/examples/help_categories.py +1 -0
  167. {cmd2-2.4.3 → cmd2-2.5.1}/examples/initialization.py +12 -11
  168. {cmd2-2.4.3 → cmd2-2.5.1}/examples/migrating.py +1 -0
  169. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands/commandset_basic.py +1 -0
  170. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands/commandset_custominit.py +1 -0
  171. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands_basic.py +0 -0
  172. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands_dynamic.py +0 -0
  173. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands_main.py +1 -0
  174. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_subcommands.py +1 -0
  175. {cmd2-2.4.3 → cmd2-2.5.1}/examples/paged_output.py +2 -2
  176. {cmd2-2.4.3 → cmd2-2.5.1}/examples/persistent_history.py +1 -0
  177. {cmd2-2.4.3 → cmd2-2.5.1}/examples/pirate.py +1 -2
  178. {cmd2-2.4.3 → cmd2-2.5.1}/examples/python_scripting.py +1 -0
  179. {cmd2-2.4.3 → cmd2-2.5.1}/examples/read_input.py +1 -1
  180. {cmd2-2.4.3 → cmd2-2.5.1}/examples/remove_settable.py +1 -0
  181. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/conditional.py +1 -0
  182. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/save_help_text.py +0 -1
  183. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/script.py +1 -0
  184. {cmd2-2.4.3 → cmd2-2.5.1}/examples/table_creation.py +1 -0
  185. {cmd2-2.4.3 → cmd2-2.5.1}/examples/unicode_commands.py +2 -2
  186. {cmd2-2.4.3 → cmd2-2.5.1}/noxfile.py +2 -9
  187. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/build-pyenvs.sh +2 -2
  188. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/cmd2_ext_test/__init__.py +1 -7
  189. {cmd2-2.4.3/plugins/template → cmd2-2.5.1/plugins/ext_test}/noxfile.py +1 -1
  190. cmd2-2.5.1/plugins/ext_test/pyproject.toml +194 -0
  191. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/setup.py +3 -3
  192. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/tasks.py +18 -10
  193. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/tasks.py +23 -6
  194. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/README.md +9 -21
  195. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/build-pyenvs.sh +2 -2
  196. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/cmd2_myplugin/__init__.py +2 -6
  197. {cmd2-2.4.3/plugins/ext_test → cmd2-2.5.1/plugins/template}/noxfile.py +1 -1
  198. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/setup.py +2 -3
  199. cmd2-2.5.1/pyproject.toml +235 -0
  200. {cmd2-2.4.3 → cmd2-2.5.1}/readme_files/shoutout.txt +39 -40
  201. cmd2-2.5.1/setup.cfg +4 -0
  202. {cmd2-2.4.3 → cmd2-2.5.1}/setup.py +20 -14
  203. {cmd2-2.4.3 → cmd2-2.5.1}/tasks.py +24 -13
  204. {cmd2-2.4.3 → cmd2-2.5.1}/tests/conftest.py +30 -14
  205. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/raises_exception.py +1 -0
  206. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/recursive.py +1 -0
  207. {cmd2-2.4.3 → cmd2-2.5.1}/tests/script.py +1 -0
  208. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_ansi.py +1 -1
  209. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_argparse.py +42 -28
  210. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_argparse_completer.py +3 -6
  211. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_argparse_custom.py +1 -5
  212. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_cmd2.py +209 -68
  213. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_completion.py +5 -4
  214. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_history.py +63 -4
  215. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_parsing.py +25 -5
  216. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_plugin.py +2 -1
  217. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_run_pyscript.py +22 -0
  218. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_table_creator.py +1 -0
  219. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_transcript.py +2 -2
  220. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_utils.py +36 -8
  221. {cmd2-2.4.3 → cmd2-2.5.1}/tests/test_utils_defining_class.py +3 -1
  222. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/from_cmdloop.txt +1 -1
  223. cmd2-2.5.1/tests/transcripts/regex_set.txt +28 -0
  224. {cmd2-2.4.3 → cmd2-2.5.1}/tests_isolated/test_commandset/conftest.py +1 -0
  225. {cmd2-2.4.3 → cmd2-2.5.1}/tests_isolated/test_commandset/test_categories.py +1 -0
  226. {cmd2-2.4.3 → cmd2-2.5.1}/tests_isolated/test_commandset/test_commandset.py +37 -3
  227. cmd2-2.4.3/Pipfile +0 -35
  228. cmd2-2.4.3/cmd2/clipboard.py +0 -44
  229. cmd2-2.4.3/examples/cmd2_history.dat +0 -0
  230. cmd2-2.4.3/pyproject.toml +0 -26
  231. cmd2-2.4.3/setup.cfg +0 -62
  232. cmd2-2.4.3/tests/transcripts/regex_set.txt +0 -27
  233. {cmd2-2.4.3 → cmd2-2.5.1}/MANIFEST.in +0 -0
  234. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/constants.py +0 -0
  235. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2/py.typed +0 -0
  236. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2.egg-info/dependency_links.txt +0 -0
  237. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2.egg-info/top_level.txt +0 -0
  238. {cmd2-2.4.3 → cmd2-2.5.1}/cmd2.png +0 -0
  239. {cmd2-2.4.3 → cmd2-2.5.1}/docs/Makefile +0 -0
  240. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/ansi.rst +0 -0
  241. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/argparse_completer.rst +0 -0
  242. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/argparse_custom.rst +0 -0
  243. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/command_definition.rst +0 -0
  244. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/constants.rst +0 -0
  245. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/decorators.rst +0 -0
  246. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/exceptions.rst +0 -0
  247. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/history.rst +0 -0
  248. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/index.rst +0 -0
  249. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/parsing.rst +0 -0
  250. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/plugin.rst +0 -0
  251. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/plugin_external_test.rst +0 -0
  252. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/py_bridge.rst +0 -0
  253. {cmd2-2.4.3 → cmd2-2.5.1}/docs/api/table_creator.rst +0 -0
  254. {cmd2-2.4.3 → cmd2-2.5.1}/docs/examples/alternate_event_loops.rst +0 -0
  255. {cmd2-2.4.3 → cmd2-2.5.1}/docs/examples/first_app.rst +0 -0
  256. {cmd2-2.4.3 → cmd2-2.5.1}/docs/examples/index.rst +0 -0
  257. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/completion.rst +0 -0
  258. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/disable_commands.rst +0 -0
  259. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/embedded_python_shells.rst +0 -0
  260. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/generating_output.rst +0 -0
  261. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/history.rst +0 -0
  262. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/index.rst +0 -0
  263. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/misc.rst +0 -0
  264. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/modular_commands.rst +0 -0
  265. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/os.rst +0 -0
  266. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/packaging.rst +0 -0
  267. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/plugins.rst +0 -0
  268. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/redirection.rst +0 -0
  269. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/shortcuts_aliases_macros.rst +0 -0
  270. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/startup_commands.rst +0 -0
  271. {cmd2-2.4.3 → cmd2-2.5.1}/docs/features/table_creation.rst +0 -0
  272. {cmd2-2.4.3 → cmd2-2.5.1}/docs/index.rst +0 -0
  273. {cmd2-2.4.3 → cmd2-2.5.1}/docs/make.bat +0 -0
  274. {cmd2-2.4.3 → cmd2-2.5.1}/docs/migrating/incompatibilities.rst +0 -0
  275. {cmd2-2.4.3 → cmd2-2.5.1}/docs/migrating/index.rst +0 -0
  276. {cmd2-2.4.3 → cmd2-2.5.1}/docs/migrating/minimum.rst +0 -0
  277. {cmd2-2.4.3 → cmd2-2.5.1}/docs/migrating/next_steps.rst +0 -0
  278. {cmd2-2.4.3 → cmd2-2.5.1}/docs/migrating/summary.rst +0 -0
  279. {cmd2-2.4.3 → cmd2-2.5.1}/docs/overview/alternatives.rst +0 -0
  280. {cmd2-2.4.3 → cmd2-2.5.1}/docs/overview/index.rst +0 -0
  281. {cmd2-2.4.3 → cmd2-2.5.1}/docs/overview/integrating.rst +0 -0
  282. {cmd2-2.4.3 → cmd2-2.5.1}/docs/overview/resources.rst +0 -0
  283. {cmd2-2.4.3 → cmd2-2.5.1}/docs/overview/summary.rst +0 -0
  284. {cmd2-2.4.3 → cmd2-2.5.1}/docs/plugins/external_test.rst +0 -0
  285. {cmd2-2.4.3 → cmd2-2.5.1}/docs/plugins/index.rst +0 -0
  286. {cmd2-2.4.3 → cmd2-2.5.1}/examples/.cmd2rc +0 -0
  287. {cmd2-2.4.3 → cmd2-2.5.1}/examples/arg_print.py +0 -0
  288. {cmd2-2.4.3 → cmd2-2.5.1}/examples/cmd_as_argument.py +0 -0
  289. {cmd2-2.4.3 → cmd2-2.5.1}/examples/first_app.py +0 -0
  290. {cmd2-2.4.3 → cmd2-2.5.1}/examples/hooks.py +0 -0
  291. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands/__init__.py +0 -0
  292. {cmd2-2.4.3 → cmd2-2.5.1}/examples/modular_commands/commandset_complex.py +0 -0
  293. {cmd2-2.4.3 → cmd2-2.5.1}/examples/override_parser.py +0 -0
  294. {cmd2-2.4.3 → cmd2-2.5.1}/examples/remove_builtin_commands.py +0 -0
  295. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/arg_printer.py +0 -0
  296. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/nested.txt +0 -0
  297. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/quit.txt +0 -0
  298. {cmd2-2.4.3 → cmd2-2.5.1}/examples/scripts/script.txt +0 -0
  299. {cmd2-2.4.3 → cmd2-2.5.1}/examples/subcommands.py +0 -0
  300. {cmd2-2.4.3 → cmd2-2.5.1}/examples/transcripts/exampleSession.txt +0 -0
  301. {cmd2-2.4.3 → cmd2-2.5.1}/examples/transcripts/pirate.transcript +0 -0
  302. {cmd2-2.4.3 → cmd2-2.5.1}/examples/transcripts/quit.txt +0 -0
  303. {cmd2-2.4.3 → cmd2-2.5.1}/examples/transcripts/transcript_regex.txt +0 -0
  304. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/README.txt +0 -0
  305. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/CHANGELOG.md +0 -0
  306. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/README.md +0 -0
  307. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/cmd2_ext_test/cmd2_ext_test.py +0 -0
  308. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/cmd2_ext_test/py.typed +0 -0
  309. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/cmd2_ext_test/pylintrc +0 -0
  310. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/examples/example.py +0 -0
  311. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/tests/__init__.py +0 -0
  312. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/tests/pylintrc +0 -0
  313. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/ext_test/tests/test_ext_test.py +0 -0
  314. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/CHANGELOG.md +0 -0
  315. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/LICENSE +0 -0
  316. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/cmd2_myplugin/myplugin.py +0 -0
  317. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/cmd2_myplugin/pylintrc +0 -0
  318. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/examples/example.py +0 -0
  319. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/tasks.py +0 -0
  320. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/tests/__init__.py +0 -0
  321. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/tests/pylintrc +0 -0
  322. {cmd2-2.4.3 → cmd2-2.5.1}/plugins/template/tests/test_myplugin.py +0 -0
  323. {cmd2-2.4.3 → cmd2-2.5.1}/readme_files/shout_out.csv +0 -0
  324. {cmd2-2.4.3 → cmd2-2.5.1}/tests/.cmd2rc +0 -0
  325. {cmd2-2.4.3 → cmd2-2.5.1}/tests/__init__.py +0 -0
  326. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/echo.py +0 -0
  327. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/environment.py +0 -0
  328. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/help.py +0 -0
  329. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/py_locals.py +0 -0
  330. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/pyscript_dir.py +0 -0
  331. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/self_in_py.py +0 -0
  332. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/stdout_capture.py +0 -0
  333. {cmd2-2.4.3 → cmd2-2.5.1}/tests/pyscript/stop.py +0 -0
  334. {cmd2-2.4.3 → cmd2-2.5.1}/tests/relative_multiple.txt +0 -0
  335. {cmd2-2.4.3 → cmd2-2.5.1}/tests/script.txt +0 -0
  336. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/binary.bin +0 -0
  337. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/empty.txt +0 -0
  338. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/help.txt +0 -0
  339. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/nested.txt +0 -0
  340. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/one_down.txt +0 -0
  341. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/postcmds.txt +0 -0
  342. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/precmds.txt +0 -0
  343. {cmd2-2.4.3 → cmd2-2.5.1}/tests/scripts/utf8.txt +0 -0
  344. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/bol_eol.txt +0 -0
  345. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/characterclass.txt +0 -0
  346. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/dotstar.txt +0 -0
  347. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/extension_notation.txt +0 -0
  348. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/failure.txt +0 -0
  349. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/multiline_no_regex.txt +0 -0
  350. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/multiline_regex.txt +0 -0
  351. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/no_output.txt +0 -0
  352. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/no_output_last.txt +0 -0
  353. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/singleslash.txt +0 -0
  354. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/slashes_escaped.txt +0 -0
  355. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/slashslash.txt +0 -0
  356. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/spaces.txt +0 -0
  357. {cmd2-2.4.3 → cmd2-2.5.1}/tests/transcripts/word_boundaries.txt +0 -0
  358. {cmd2-2.4.3 → cmd2-2.5.1}/tests_isolated/__init__.py +0 -0
  359. {cmd2-2.4.3 → cmd2-2.5.1}/tests_isolated/test_commandset/__init__.py +0 -0
  360. {cmd2-2.4.3 → cmd2-2.5.1}/tests_isolated/test_commandset/test_argparse_subcommands.py +0 -0
@@ -0,0 +1,34 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version and other tools you might need
8
+ build:
9
+ os: ubuntu-22.04
10
+ tools:
11
+ python: "3.12"
12
+
13
+ # Build documentation in the "docs/" directory with Sphinx
14
+ sphinx:
15
+ configuration: docs/conf.py
16
+ # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
17
+ # builder: "dirhtml"
18
+ # Fail on all warnings to avoid broken references
19
+ # fail_on_warning: true
20
+
21
+ # Optionally build your docs in additional formats such as PDF and ePub
22
+ # formats:
23
+ # - pdf
24
+ # - epub
25
+ formats: all
26
+
27
+ # Optional but recommended, declare the Python requirements required to build your documentation
28
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
29
+ python:
30
+ install:
31
+ - method: pip
32
+ path: .
33
+ extra_requirements:
34
+ - docs
@@ -1,3 +1,28 @@
1
+ # 2.5.1 (November 2, 2024)
2
+ * Bug Fixes
3
+ * Fixed readline bug when using `ipy` command with `gnureadline` and Python 3.13
4
+
5
+ ## 2.5.0 (October 23, 2024)
6
+ * Breaking Change
7
+ * `cmd2` 2.5 supports Python 3.8+ (removed support for Python 3.6 and 3.7)
8
+ * Bug Fixes
9
+ * Fixed issue where persistent history file was not saved upon SIGHUP and SIGTERM signals.
10
+ * Multiline commands are no longer fragmented in up-arrow history.
11
+ * Fixed bug where `async_alert()` overwrites readline's incremental and non-incremental search prompts.
12
+ * This fix introduces behavior where an updated prompt won't display after an aborted search
13
+ until a user presses Enter. See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
14
+ example for how to handle this case using `Cmd.need_prompt_refresh()` and `Cmd.async_refresh_prompt()`.
15
+ * Enhancements
16
+ * Removed dependency on `attrs` and replaced with [dataclasses](https://docs.python.org/3/library/dataclasses.html)
17
+ * add `allow_clipboard` initialization parameter and attribute to disable ability to
18
+ add output to the operating system clipboard
19
+ * Updated unit tests to be Python 3.13 compliant.
20
+ * Fall back to bz2 compression of history file when lzma is not installed.
21
+ * Added settable called `scripts_add_to_history` which determines whether scripts and pyscripts
22
+ add commands to history.
23
+ * Deletions (potentially breaking changes)
24
+ * Removed `apply_style` from `Cmd.pwarning()`.
25
+
1
26
  ## 2.4.3 (January 27, 2023)
2
27
  * Bug Fixes
3
28
  * Fixed ValueError caused when passing `Cmd.columnize()` strings wider than `display_width`.
@@ -84,7 +109,7 @@
84
109
  * Added `ap_completer_type` keyword arg to `Cmd2ArgumentParser.__init__()` which saves a call
85
110
  to `set_ap_completer_type()`. This keyword will also work with `add_parser()` when creating subcommands
86
111
  if the base command's parser is a `Cmd2ArgumentParser`.
87
- * New function `register_argparse_argument_parameter()` allows developers to specify custom
112
+ * New function `register_argparse_argument_parameter()` allows developers to specify custom
88
113
  parameters to be passed to the argparse parser's `add_argument()` method. These parameters will
89
114
  become accessible in the resulting argparse Action object when modifying `ArgparseCompleter` behavior.
90
115
  * Using `SimpleTable` in the output for the following commands to improve appearance.
@@ -257,12 +282,12 @@
257
282
 
258
283
  ## 1.3.7 (August 27, 2020)
259
284
  * Bug Fixes
260
- * Fixes an issue introduced in 1.3.0 with processing command strings containing terminator/separator
285
+ * Fixes an issue introduced in 1.3.0 with processing command strings containing terminator/separator
261
286
  character(s) that are manually passed to a command that uses argparse.
262
287
 
263
288
  ## 1.3.6 (August 27, 2020)
264
289
  * Breaking changes
265
- * The functions cmd2 adds to Namespaces (`get_statement()` and `get_handler()`) are now
290
+ * The functions cmd2 adds to Namespaces (`get_statement()` and `get_handler()`) are now
266
291
  `Cmd2AttributeWrapper` objects named `cmd2_statement` and `cmd2_handler`. This makes it
267
292
  easy to filter out which attributes in an `argparse.Namespace` were added by `cmd2`.
268
293
  * Deprecations
@@ -288,7 +313,7 @@
288
313
  * Breaking changes
289
314
  * CommandSet command functions (do_, complete_, help_) will no longer have the cmd2 app
290
315
  passed in as the first parameter after `self` since this is already a class member.
291
- * Renamed `install_command_set()` and `uninstall_command_set()` to `register_command_set()` and
316
+ * Renamed `install_command_set()` and `uninstall_command_set()` to `register_command_set()` and
292
317
  `unregister_command_set()` for better name consistency.
293
318
  * Bug Fixes
294
319
  * Fixed help formatting bug in `Cmd2ArgumentParser` when `metavar` is a tuple
@@ -298,8 +323,8 @@
298
323
  * Removed explicit type hints that fail due to a bug in 3.5.2 favoring comment-based hints instead
299
324
  * When passing a ns_provider to an argparse command, will now attempt to resolve the correct
300
325
  CommandSet instance for self. If not, it'll fall back and pass in the cmd2 app
301
- * Other
302
- * Added missing doc-string for new cmd2.Cmd __init__ parameters
326
+ * Other
327
+ * Added missing doc-string for new cmd2.Cmd __init__ parameters
303
328
  introduced by CommandSet enhancement
304
329
 
305
330
  ## 1.3.2 (August 10, 2020)
@@ -314,8 +339,8 @@
314
339
  ## 1.3.1 (August 6, 2020)
315
340
  * Bug Fixes
316
341
  * Fixed issue determining whether an argparse completer function required a reference to a containing
317
- CommandSet. Also resolves issues determining the correct CommandSet instance when calling the argparse
318
- argument completer function. Manifested as a TypeError when using `cmd2.Cmd.path_complete` as a completer
342
+ CommandSet. Also resolves issues determining the correct CommandSet instance when calling the argparse
343
+ argument completer function. Manifested as a TypeError when using `cmd2.Cmd.path_complete` as a completer
319
344
  for an argparse-based command defined in a CommandSet
320
345
 
321
346
  ## 1.3.0 (August 4, 2020)
@@ -324,7 +349,7 @@
324
349
  with your cmd2 application.
325
350
  * Other
326
351
  * Marked with_argparser_and_unknown_args pending deprecation and consolidated implementation into
327
- with_argparser
352
+ with_argparser
328
353
 
329
354
  ## 1.2.1 (July 14, 2020)
330
355
  * Bug Fixes
@@ -332,7 +357,7 @@
332
357
 
333
358
  ## 1.2.0 (July 13, 2020)
334
359
  * Bug Fixes
335
- * Fixed `typing` module compatibility issue with Python 3.5 prior to 3.5.4
360
+ * Fixed `typing` module compatibility issue with Python 3.5 prior to 3.5.4
336
361
  * Enhancements
337
362
  * Switched to getting version using `importlib.metadata` instead of using `pkg_resources`
338
363
  * Improves `cmd2` application launch time on systems that have a lot of Python packages on `sys.path`
@@ -341,7 +366,7 @@
341
366
  ## 1.1.0 (June 6, 2020)
342
367
  * Bug Fixes
343
368
  * Fixed issue where subcommand usage text could contain a subcommand alias instead of the actual name
344
- * Fixed bug in `ArgparseCompleter` where `fill_width` could become negative if `token_width` was large
369
+ * Fixed bug in `ArgparseCompleter` where `fill_width` could become negative if `token_width` was large
345
370
  relative to the terminal width.
346
371
  * Enhancements
347
372
  * Made `ipy` consistent with `py` in the following ways
@@ -365,7 +390,7 @@
365
390
  after parsing fails, just return instead of raising an exception.
366
391
  * Added explicit handling of `SystemExit`. If a command raises this exception, the command loop will be
367
392
  gracefully stopped.
368
-
393
+
369
394
  ## 1.0.2 (April 06, 2020)
370
395
  * Bug Fixes
371
396
  * Ctrl-C now stops a running text script instead of just the current `run_script` command
@@ -388,9 +413,9 @@
388
413
  * Bug Fixes
389
414
  * Corrected issue where the actual new value was not always being printed in do_set. This occurred in cases where
390
415
  the typed value differed from what the setter had converted it to.
391
- * Fixed bug where ANSI style sequences were not correctly handled in `utils.truncate_line()`.
416
+ * Fixed bug where ANSI style sequences were not correctly handled in `utils.truncate_line()`.
392
417
  * Fixed bug where pyscripts could edit `cmd2.Cmd.py_locals` dictionary.
393
- * Fixed bug where cmd2 set `sys.path[0]` for a pyscript to cmd2's working directory instead of the
418
+ * Fixed bug where cmd2 set `sys.path[0]` for a pyscript to cmd2's working directory instead of the
394
419
  script file's directory.
395
420
  * Fixed bug where `sys.path` was not being restored after a pyscript ran.
396
421
  * Enhancements
@@ -704,7 +729,7 @@
704
729
  * Enhancements
705
730
  * Added ability to include command name placeholders in the message printed when trying to run a disabled command.
706
731
  * See docstring for ``disable_command()`` or ``disable_category()`` for more details.
707
- * Added instance attributes to customize error messages without having to override methods. Theses messages can
732
+ * Added instance attributes to customize error messages without having to override methods. These messages can
708
733
  also be colored.
709
734
  * `help_error` - the error that prints when no help information can be found
710
735
  * `default_error` - the error that prints when a non-existent command is run
@@ -841,7 +866,7 @@
841
866
  * Aliases are now sorted alphabetically
842
867
  * The **set** command now tab completes settable parameter names
843
868
  * Added ``async_alert``, ``async_update_prompt``, and ``set_window_title`` functions
844
- * These allow you to provide feedback to the user in an asychronous fashion, meaning alerts can
869
+ * These allow you to provide feedback to the user in an asynchronous fashion, meaning alerts can
845
870
  display when the user is still entering text at the prompt. See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
846
871
  for an example.
847
872
  * Cross-platform colored output support
@@ -941,7 +966,7 @@
941
966
  * New pyscript approach that provides a pythonic interface to commands in the cmd2 application.
942
967
  * Switch command parsing from pyparsing to custom code which utilizes shlex.
943
968
  * The object passed to do_* methods has changed. It no longer is the pyparsing object, it's a new Statement object, which is a subclass of ``str``. The statement object has many attributes which give you access to various components of the parsed input. If you were using anything but the string in your do_* methods, this change will require you to update your code.
944
- * ``commentGrammers`` is no longer supported or available. Comments are C-style or python style.
969
+ * ``commentGrammars`` is no longer supported or available. Comments are C-style or python style.
945
970
  * Input redirection no longer supported. Use the load command instead.
946
971
  * ``multilineCommand`` attribute is ``now multiline_command``
947
972
  * ``identchars`` is now ignored. The standardlibrary cmd uses those characters to split the first "word" of the input, but cmd2 hasn't used those for a while, and the new parsing logic parses on whitespace, which has the added benefit of full unicode support, unlike cmd or prior versions of cmd2.
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2008-2023 Catherine Devlin and others
3
+ Copyright (c) 2008-2024 Catherine Devlin and others
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cmd2
3
- Version: 2.4.3
3
+ Version: 2.5.1
4
4
  Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
5
5
  Home-page: https://github.com/python-cmd2/cmd2
6
6
  Author: Catherine Devlin
@@ -16,19 +16,51 @@ Classifier: Intended Audience :: System Administrators
16
16
  Classifier: License :: OSI Approved :: MIT License
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.6
20
- Classifier: Programming Language :: Python :: 3.7
21
19
  Classifier: Programming Language :: Python :: 3.8
22
20
  Classifier: Programming Language :: Python :: 3.9
23
21
  Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
24
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.6
27
+ Requires-Python: >=3.8
27
28
  Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: pyperclip
31
+ Requires-Dist: wcwidth
32
+ Requires-Dist: pyreadline3; sys_platform == "win32"
28
33
  Provides-Extra: test
34
+ Requires-Dist: gnureadline; sys_platform == "darwin" and extra == "test"
35
+ Requires-Dist: codecov; extra == "test"
36
+ Requires-Dist: coverage; extra == "test"
37
+ Requires-Dist: pytest; extra == "test"
38
+ Requires-Dist: pytest-cov; extra == "test"
39
+ Requires-Dist: pytest-mock; extra == "test"
29
40
  Provides-Extra: dev
41
+ Requires-Dist: codecov; extra == "dev"
42
+ Requires-Dist: doc8; extra == "dev"
43
+ Requires-Dist: invoke; extra == "dev"
44
+ Requires-Dist: mypy; extra == "dev"
45
+ Requires-Dist: nox; extra == "dev"
46
+ Requires-Dist: pytest>=4.6; extra == "dev"
47
+ Requires-Dist: pytest-cov; extra == "dev"
48
+ Requires-Dist: pytest-mock; extra == "dev"
49
+ Requires-Dist: sphinx; extra == "dev"
50
+ Requires-Dist: sphinx-rtd-theme; extra == "dev"
51
+ Requires-Dist: sphinx-autobuild; extra == "dev"
52
+ Requires-Dist: ruff; extra == "dev"
53
+ Requires-Dist: twine; extra == "dev"
54
+ Provides-Extra: docs
55
+ Requires-Dist: setuptools; extra == "docs"
56
+ Requires-Dist: setuptools_scm; extra == "docs"
57
+ Requires-Dist: sphinx; extra == "docs"
58
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
59
+ Requires-Dist: sphinx-autobuild; extra == "docs"
30
60
  Provides-Extra: validate
31
- License-File: LICENSE
61
+ Requires-Dist: mypy; extra == "validate"
62
+ Requires-Dist: ruff; extra == "validate"
63
+ Requires-Dist: types-setuptools; extra == "validate"
32
64
 
33
65
  <h1 align="center">cmd2 : immersive interactive command line applications</h1>
34
66
 
@@ -40,7 +72,7 @@ License-File: LICENSE
40
72
 
41
73
 
42
74
  <p align="center">
43
- <a href="#the-developers-toolbox">Develper's Toolbox</a> •
75
+ <a href="#the-developers-toolbox">Developer's Toolbox</a> •
44
76
  <a href="#philosophy">Philosophy</a> •
45
77
  <a href="#installation">Installation</a> •
46
78
  <a href="#documentation">Documentation</a> •
@@ -64,14 +96,14 @@ The developers toolbox
64
96
  ![system schema](https://raw.githubusercontent.com/python-cmd2/cmd2/master/.github/images/graph.drawio.png)
65
97
 
66
98
 
67
- When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
68
- System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line tools created by strangers on github and the guy down the hall.
69
- Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
70
- On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering functionality.
99
+ When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
100
+ System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line tools created by strangers on github and the guy down the hall.
101
+ Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
102
+ On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering functionality.
71
103
  The price we pay for beautifully colored displays is complexity required to aggregate disperate applications into larger systems.
72
- `cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart workflow automation systems.
104
+ `cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart workflow automation systems.
73
105
 
74
- The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
106
+ The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
75
107
  When users become comfortable with functionality, cmd2 turns into a feature rich library enabling a smooth transition to full automation. If designed with enough forethought, a well implemented cmd2 application can serve as a boutique workflow tool. `cmd2` pulls off this flexibility based on two pillars of philosophy:
76
108
 
77
109
  * Tab Completion
@@ -110,7 +142,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
110
142
  pip install -U cmd2
111
143
  ```
112
144
 
113
- cmd2 works with Python 3.6+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
145
+ cmd2 works with Python 3.8+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
114
146
 
115
147
  For information on other installation options, see
116
148
  [Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation.html) in the cmd2
@@ -129,7 +161,7 @@ The best way to learn the cmd2 api is to delve into the example applications loc
129
161
  Tutorials
130
162
  ---------
131
163
 
132
- * PyOhio 2019 presentation:
164
+ * PyOhio 2019 presentation:
133
165
  * [video](https://www.youtube.com/watch?v=pebeWrTqIIw)
134
166
  * [slides](https://github.com/python-cmd2/talks/blob/master/PyOhio_2019/cmd2-PyOhio_2019.pdf)
135
167
  * [example code](https://github.com/python-cmd2/talks/tree/master/PyOhio_2019/examples)
@@ -193,6 +225,4 @@ Projects using cmd2
193
225
  Possibly defunct but still good examples
194
226
 
195
227
  * [JSShell](https://github.com/Den1al/JSShell)
196
- * [FLASHMINGO](https://github.com/fireeye/flashmingo)
197
-
198
-
228
+ * [FLASHMINGO](https://github.com/fireeye/flashmingo)
cmd2-2.5.1/Pipfile ADDED
@@ -0,0 +1,33 @@
1
+ [[source]]
2
+ name = "pypi"
3
+ url = "https://pypi.org/simple"
4
+ verify_ssl = true
5
+
6
+ [packages]
7
+ pyperclip = "*"
8
+ setuptools = "*"
9
+ wcwidth = "*"
10
+
11
+ [dev-packages]
12
+ build = "*"
13
+ cmd2 = { editable = true, path = "." }
14
+ cmd2_ext_test = { editable = true, path = "plugins/ext_test" }
15
+ codecov = "*"
16
+ doc8 = "*"
17
+ gnureadline = { version = "*", sys_platform = "== 'darwin'" }
18
+ invoke = "*"
19
+ ipython = "*"
20
+ mypy = "*"
21
+ pyreadline3 = { version = ">=3.4", sys_platform = "== 'win32'" }
22
+ pytest = "*"
23
+ pytest-cov = "*"
24
+ pytest-mock = "*"
25
+ ruff = "*"
26
+ setuptools-scm = "*"
27
+ sphinx = "*"
28
+ sphinx-autobuild = "*"
29
+ sphinx-rtd-theme = "*"
30
+ twine = ">=1.11"
31
+
32
+ [pipenv]
33
+ allow_prereleases = true
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
  <p align="center">
11
- <a href="#the-developers-toolbox">Develper's Toolbox</a> •
11
+ <a href="#the-developers-toolbox">Developer's Toolbox</a> •
12
12
  <a href="#philosophy">Philosophy</a> •
13
13
  <a href="#installation">Installation</a> •
14
14
  <a href="#documentation">Documentation</a> •
@@ -32,14 +32,14 @@ The developers toolbox
32
32
  ![system schema](https://raw.githubusercontent.com/python-cmd2/cmd2/master/.github/images/graph.drawio.png)
33
33
 
34
34
 
35
- When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
36
- System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line tools created by strangers on github and the guy down the hall.
37
- Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
38
- On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering functionality.
35
+ When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
36
+ System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line tools created by strangers on github and the guy down the hall.
37
+ Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
38
+ On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering functionality.
39
39
  The price we pay for beautifully colored displays is complexity required to aggregate disperate applications into larger systems.
40
- `cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart workflow automation systems.
40
+ `cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart workflow automation systems.
41
41
 
42
- The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
42
+ The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
43
43
  When users become comfortable with functionality, cmd2 turns into a feature rich library enabling a smooth transition to full automation. If designed with enough forethought, a well implemented cmd2 application can serve as a boutique workflow tool. `cmd2` pulls off this flexibility based on two pillars of philosophy:
44
44
 
45
45
  * Tab Completion
@@ -78,7 +78,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
78
78
  pip install -U cmd2
79
79
  ```
80
80
 
81
- cmd2 works with Python 3.6+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
81
+ cmd2 works with Python 3.8+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
82
82
 
83
83
  For information on other installation options, see
84
84
  [Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation.html) in the cmd2
@@ -97,7 +97,7 @@ The best way to learn the cmd2 api is to delve into the example applications loc
97
97
  Tutorials
98
98
  ---------
99
99
 
100
- * PyOhio 2019 presentation:
100
+ * PyOhio 2019 presentation:
101
101
  * [video](https://www.youtube.com/watch?v=pebeWrTqIIw)
102
102
  * [slides](https://github.com/python-cmd2/talks/blob/master/PyOhio_2019/cmd2-PyOhio_2019.pdf)
103
103
  * [example code](https://github.com/python-cmd2/talks/tree/master/PyOhio_2019/examples)
@@ -161,4 +161,4 @@ Projects using cmd2
161
161
  Possibly defunct but still good examples
162
162
 
163
163
  * [JSShell](https://github.com/Den1al/JSShell)
164
- * [FLASHMINGO](https://github.com/fireeye/flashmingo)
164
+ * [FLASHMINGO](https://github.com/fireeye/flashmingo)
@@ -5,12 +5,8 @@
5
5
 
6
6
  import sys
7
7
 
8
- # For python 3.8 and later
9
- if sys.version_info >= (3, 8):
10
- import importlib.metadata as importlib_metadata
11
- else:
12
- # For everyone else
13
- import importlib_metadata
8
+ import importlib.metadata as importlib_metadata
9
+
14
10
  try:
15
11
  __version__ = importlib_metadata.version(__name__)
16
12
  except importlib_metadata.PackageNotFoundError: # pragma: no cover
@@ -2,7 +2,8 @@
2
2
  """
3
3
  Support for ANSI escape sequences which are used for things like applying style to text,
4
4
  setting the window title, and asynchronous alerts.
5
- """
5
+ """
6
+
6
7
  import functools
7
8
  import re
8
9
  from enum import (
@@ -62,25 +63,25 @@ The default is ``AllowStyle.TERMINAL``.
62
63
  """
63
64
 
64
65
  # Regular expression to match ANSI style sequence
65
- ANSI_STYLE_RE = re.compile(fr'{ESC}\[[^m]*m')
66
+ ANSI_STYLE_RE = re.compile(rf'{ESC}\[[^m]*m')
66
67
 
67
68
  # Matches standard foreground colors: CSI(30-37|90-97|39)m
68
- STD_FG_RE = re.compile(fr'{ESC}\[(?:[39][0-7]|39)m')
69
+ STD_FG_RE = re.compile(rf'{ESC}\[(?:[39][0-7]|39)m')
69
70
 
70
71
  # Matches standard background colors: CSI(40-47|100-107|49)m
71
- STD_BG_RE = re.compile(fr'{ESC}\[(?:(?:4|10)[0-7]|49)m')
72
+ STD_BG_RE = re.compile(rf'{ESC}\[(?:(?:4|10)[0-7]|49)m')
72
73
 
73
74
  # Matches eight-bit foreground colors: CSI38;5;(0-255)m
74
- EIGHT_BIT_FG_RE = re.compile(fr'{ESC}\[38;5;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])m')
75
+ EIGHT_BIT_FG_RE = re.compile(rf'{ESC}\[38;5;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])m')
75
76
 
76
77
  # Matches eight-bit background colors: CSI48;5;(0-255)m
77
- EIGHT_BIT_BG_RE = re.compile(fr'{ESC}\[48;5;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])m')
78
+ EIGHT_BIT_BG_RE = re.compile(rf'{ESC}\[48;5;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])m')
78
79
 
79
80
  # Matches RGB foreground colors: CSI38;2;(0-255);(0-255);(0-255)m
80
- RGB_FG_RE = re.compile(fr'{ESC}\[38;2(?:;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])){{3}}m')
81
+ RGB_FG_RE = re.compile(rf'{ESC}\[38;2(?:;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])){{3}}m')
81
82
 
82
83
  # Matches RGB background colors: CSI48;2;(0-255);(0-255);(0-255)m
83
- RGB_BG_RE = re.compile(fr'{ESC}\[48;2(?:;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])){{3}}m')
84
+ RGB_BG_RE = re.compile(rf'{ESC}\[48;2(?:;(?:1?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5])){{3}}m')
84
85
 
85
86
 
86
87
  def strip_style(text: str) -> str:
@@ -224,7 +225,6 @@ class BgColor(AnsiSequence):
224
225
  ####################################################################################
225
226
  # Implementations intended for direct use
226
227
  ####################################################################################
227
- # noinspection PyPep8Naming
228
228
  class Cursor:
229
229
  """Create ANSI sequences to alter the cursor position"""
230
230
 
@@ -1042,6 +1042,9 @@ def style(
1042
1042
  # Default styles for printing strings of various types.
1043
1043
  # These can be altered to suit an application's needs and only need to be a
1044
1044
  # function with the following structure: func(str) -> str
1045
+ style_output = functools.partial(style)
1046
+ """Partial function supplying arguments to :meth:`cmd2.ansi.style()` which colors text for normal output"""
1047
+
1045
1048
  style_success = functools.partial(style, fg=Fg.GREEN)
1046
1049
  """Partial function supplying arguments to :meth:`cmd2.ansi.style()` which colors text to signify success"""
1047
1050
 
@@ -1056,7 +1059,7 @@ def async_alert_str(*, terminal_columns: int, prompt: str, line: str, cursor_off
1056
1059
  """Calculate the desired string, including ANSI escape codes, for displaying an asynchronous alert message.
1057
1060
 
1058
1061
  :param terminal_columns: terminal width (number of columns)
1059
- :param prompt: prompt that is displayed on the current line
1062
+ :param prompt: current onscreen prompt
1060
1063
  :param line: current contents of the Readline line buffer
1061
1064
  :param cursor_offset: the offset of the current cursor position within line
1062
1065
  :param alert_msg: the message to display to the user
@@ -1069,9 +1072,9 @@ def async_alert_str(*, terminal_columns: int, prompt: str, line: str, cursor_off
1069
1072
  # Calculate how many terminal lines are taken up by all prompt lines except for the last one.
1070
1073
  # That will be included in the input lines calculations since that is where the cursor is.
1071
1074
  num_prompt_terminal_lines = 0
1072
- for line in prompt_lines[:-1]:
1073
- line_width = style_aware_wcswidth(line)
1074
- num_prompt_terminal_lines += int(line_width / terminal_columns) + 1
1075
+ for prompt_line in prompt_lines[:-1]:
1076
+ prompt_line_width = style_aware_wcswidth(prompt_line)
1077
+ num_prompt_terminal_lines += int(prompt_line_width / terminal_columns) + 1
1075
1078
 
1076
1079
  # Now calculate how many terminal lines are take up by the input
1077
1080
  last_prompt_line = prompt_lines[-1]
@@ -61,7 +61,6 @@ DEFAULT_DESCRIPTIVE_HEADER = 'Description'
61
61
  ARG_TOKENS = 'arg_tokens'
62
62
 
63
63
 
64
- # noinspection PyProtectedMember
65
64
  def _build_hint(parser: argparse.ArgumentParser, arg_action: argparse.Action) -> str:
66
65
  """Build tab completion hint for a given argument"""
67
66
  # Check if hinting is disabled for this argument
@@ -82,7 +81,6 @@ def _single_prefix_char(token: str, parser: argparse.ArgumentParser) -> bool:
82
81
  return len(token) == 1 and token[0] in parser.prefix_chars
83
82
 
84
83
 
85
- # noinspection PyProtectedMember
86
84
  def _looks_like_flag(token: str, parser: argparse.ArgumentParser) -> bool:
87
85
  """
88
86
  Determine if a token looks like a flag. Unless an argument has nargs set to argparse.REMAINDER,
@@ -94,7 +92,7 @@ def _looks_like_flag(token: str, parser: argparse.ArgumentParser) -> bool:
94
92
  return False
95
93
 
96
94
  # Flags have to start with a prefix character
97
- if not token[0] in parser.prefix_chars:
95
+ if token[0] not in parser.prefix_chars:
98
96
  return False
99
97
 
100
98
  # If it looks like a negative number, it is not a flag unless there are negative-number-like flags
@@ -144,7 +142,6 @@ class _ArgumentState:
144
142
  self.max = self.action.nargs
145
143
 
146
144
 
147
- # noinspection PyProtectedMember
148
145
  class _UnfinishedFlagError(CompletionError):
149
146
  def __init__(self, flag_arg_state: _ArgumentState) -> None:
150
147
  """
@@ -171,7 +168,6 @@ class _NoResultsError(CompletionError):
171
168
  super().__init__(_build_hint(parser, arg_action), apply_style=False)
172
169
 
173
170
 
174
- # noinspection PyProtectedMember
175
171
  class ArgparseCompleter:
176
172
  """Automatic command line tab completion based on argparse parameters"""
177
173
 
@@ -273,10 +269,8 @@ class ArgparseCompleter:
273
269
  # Check if this action is in a mutually exclusive group
274
270
  for group in self._parser._mutually_exclusive_groups:
275
271
  if arg_action in group._group_actions:
276
-
277
272
  # Check if the group this action belongs to has already been completed
278
273
  if group in completed_mutex_groups:
279
-
280
274
  # If this is the action that completed the group, then there is no error
281
275
  # since it's allowed to appear on the command line more than once.
282
276
  completer_action = completed_mutex_groups[group]
@@ -307,7 +301,6 @@ class ArgparseCompleter:
307
301
  # Parse all but the last token
308
302
  #############################################################################################
309
303
  for token_index, token in enumerate(tokens[:-1]):
310
-
311
304
  # If we're in a positional REMAINDER arg, force all future tokens to go to that
312
305
  if pos_arg_state is not None and pos_arg_state.is_remainder:
313
306
  consume_argument(pos_arg_state)
@@ -339,7 +332,6 @@ class ArgparseCompleter:
339
332
 
340
333
  # Check the format of the current token to see if it can be an argument's value
341
334
  if _looks_like_flag(token, self._parser) and not skip_remaining_flags:
342
-
343
335
  # Check if there is an unfinished flag
344
336
  if (
345
337
  flag_arg_state is not None
@@ -484,7 +476,6 @@ class ArgparseCompleter:
484
476
 
485
477
  # Otherwise check if we have a positional to complete
486
478
  elif pos_arg_state is not None or remaining_positionals:
487
-
488
479
  # If we aren't current tracking a positional, then get the next positional arg to handle this token
489
480
  if pos_arg_state is None:
490
481
  action = remaining_positionals.popleft()