cli-command-parser 2025.6.14__tar.gz → 2025.7.10__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 (68) hide show
  1. {cli_command_parser-2025.6.14/lib/cli_command_parser.egg-info → cli_command_parser-2025.7.10}/PKG-INFO +6 -6
  2. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/__version__.py +1 -1
  3. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/context.py +5 -3
  4. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/base.py +8 -0
  5. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10/lib/cli_command_parser.egg-info}/PKG-INFO +6 -6
  6. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/readme.rst +5 -5
  7. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/LICENSE +0 -0
  8. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/MANIFEST.in +0 -0
  9. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/entry_points.txt +0 -0
  10. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/__init__.py +0 -0
  11. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/__main__.py +0 -0
  12. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/annotations.py +0 -0
  13. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/command_parameters.py +0 -0
  14. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/commands.py +0 -0
  15. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/compat.py +0 -0
  16. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/config.py +0 -0
  17. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/__init__.py +0 -0
  18. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/__main__.py +0 -0
  19. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/argparse_ast.py +0 -0
  20. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/argparse_utils.py +0 -0
  21. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/cli.py +0 -0
  22. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/command_builder.py +0 -0
  23. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/utils.py +0 -0
  24. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/conversion/visitor.py +0 -0
  25. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/core.py +0 -0
  26. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/documentation.py +0 -0
  27. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/error_handling/__init__.py +0 -0
  28. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/error_handling/base.py +0 -0
  29. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/error_handling/other.py +0 -0
  30. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/error_handling/windows.py +0 -0
  31. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/exceptions.py +0 -0
  32. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/formatting/__init__.py +0 -0
  33. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/formatting/commands.py +0 -0
  34. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/formatting/params.py +0 -0
  35. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/formatting/restructured_text.py +0 -0
  36. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/formatting/utils.py +0 -0
  37. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/__init__.py +0 -0
  38. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/base.py +0 -0
  39. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/choices.py +0 -0
  40. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/exceptions.py +0 -0
  41. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/files.py +0 -0
  42. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/numeric.py +0 -0
  43. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/patterns.py +0 -0
  44. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/time.py +0 -0
  45. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/inputs/utils.py +0 -0
  46. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/metadata.py +0 -0
  47. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/nargs.py +0 -0
  48. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/__init__.py +0 -0
  49. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/actions.py +0 -0
  50. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/choice_map.py +0 -0
  51. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/groups.py +0 -0
  52. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/option_strings.py +0 -0
  53. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/options.py +0 -0
  54. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/pass_thru.py +0 -0
  55. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parameters/positionals.py +0 -0
  56. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parse_tree.py +0 -0
  57. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/parser.py +0 -0
  58. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/testing.py +0 -0
  59. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/typing.py +0 -0
  60. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser/utils.py +0 -0
  61. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser.egg-info/SOURCES.txt +0 -0
  62. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser.egg-info/dependency_links.txt +0 -0
  63. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser.egg-info/entry_points.txt +0 -0
  64. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser.egg-info/requires.txt +0 -0
  65. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/lib/cli_command_parser.egg-info/top_level.txt +0 -0
  66. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/pyproject.toml +0 -0
  67. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/requirements-dev.txt +0 -0
  68. {cli_command_parser-2025.6.14 → cli_command_parser-2025.7.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli_command_parser
3
- Version: 2025.6.14
3
+ Version: 2025.7.10
4
4
  Summary: CLI Command Parser
5
5
  Home-page: https://github.com/dskrypa/cli_command_parser
6
6
  Author: Doug Skrypa
@@ -58,11 +58,11 @@ CLI Command Parser is a class-based CLI argument parser that defines parameters
58
58
  tools to quickly and easily get started with basic CLIs, and it scales well to support even very large and complex
59
59
  CLIs while remaining readable and easy to maintain.
60
60
 
61
- The primary goals of this project:
62
- - Make it easy to define subcommands and actions in an clean and organized manner
63
- - Allow for inheritance so that common parameters don't need to be repeated
64
- - Make it easy to handle common initialization tasks for all actions / subcommands once
65
- - Reduce the amount of boilerplate code that is necessary for setting up parsing and handling argument values
61
+ Some of the primary goals and key features of this project:
62
+ - Minimal boilerplate code is necessary to define CLI parameters and access their parsed values
63
+ - Easy to use type annotations for CLI parameters
64
+ - Subcommands can inherit common parameters so they don't need to be repeated
65
+ - Easy to handle common initialization tasks for all actions / subcommands once
66
66
 
67
67
 
68
68
  Example Program
@@ -1,7 +1,7 @@
1
1
  __title__ = 'cli_command_parser'
2
2
  __description__ = 'CLI Command Parser'
3
3
  __url__ = 'https://github.com/dskrypa/cli_command_parser'
4
- __version__ = '2025.06.14'
4
+ __version__ = '2025.07.10'
5
5
  __author__ = 'Doug Skrypa'
6
6
  __author_email__ = 'dskrypa@gmail.com'
7
7
  __license__ = 'Apache 2.0'
@@ -24,7 +24,7 @@ from .utils import Terminal, _NotSet
24
24
  if TYPE_CHECKING:
25
25
  from .command_parameters import CommandParameters
26
26
  from .commands import Command
27
- from .parameters import ActionFlag, Option, Parameter
27
+ from .parameters import ActionFlag, BaseOption, Option, Parameter
28
28
  from .typing import AnyConfig, Bool, CommandObj, CommandType, OptStr, ParamOrGroup, PathLike, StrSeq # noqa
29
29
 
30
30
  __all__ = ['Context', 'ctx', 'get_current_context', 'get_or_create_context', 'get_context', 'get_parsed', 'get_raw_arg']
@@ -250,9 +250,11 @@ class Context(AbstractContextManager): # Extending AbstractContextManager to ma
250
250
  """Not intended to be called by users. Used during parsing to determine if any Parameters are missing."""
251
251
  return [p for p in self.params.required_check_params() if not self._provided[p]]
252
252
 
253
- def missing_options_with_env_var(self) -> Iterator[Option]:
253
+ def missing_options_with_env_var(self) -> Iterator[BaseOption]:
254
254
  """Yields Option parameters that have an environment variable configured, and did not have any CLI values."""
255
- yield from (p for p in self.params.options if p.env_var and not self._provided[p])
255
+ for param in self.params.options:
256
+ if param.env_var and not self._provided[param]:
257
+ yield param
256
258
 
257
259
  # endregion
258
260
 
@@ -96,6 +96,14 @@ class ParamBase(ABC):
96
96
 
97
97
  # endregion
98
98
 
99
+ def __eq__(self, other: ParamBase) -> bool:
100
+ return (
101
+ self.__class__ == other.__class__
102
+ and self._attr_name == other._attr_name
103
+ and self._name == other._name
104
+ and self.command == other.command
105
+ )
106
+
99
107
  def __hash__(self) -> int:
100
108
  return hash(self.__class__) ^ hash(self._attr_name) ^ hash(self._name) ^ hash(self.command)
101
109
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli_command_parser
3
- Version: 2025.6.14
3
+ Version: 2025.7.10
4
4
  Summary: CLI Command Parser
5
5
  Home-page: https://github.com/dskrypa/cli_command_parser
6
6
  Author: Doug Skrypa
@@ -58,11 +58,11 @@ CLI Command Parser is a class-based CLI argument parser that defines parameters
58
58
  tools to quickly and easily get started with basic CLIs, and it scales well to support even very large and complex
59
59
  CLIs while remaining readable and easy to maintain.
60
60
 
61
- The primary goals of this project:
62
- - Make it easy to define subcommands and actions in an clean and organized manner
63
- - Allow for inheritance so that common parameters don't need to be repeated
64
- - Make it easy to handle common initialization tasks for all actions / subcommands once
65
- - Reduce the amount of boilerplate code that is necessary for setting up parsing and handling argument values
61
+ Some of the primary goals and key features of this project:
62
+ - Minimal boilerplate code is necessary to define CLI parameters and access their parsed values
63
+ - Easy to use type annotations for CLI parameters
64
+ - Subcommands can inherit common parameters so they don't need to be repeated
65
+ - Easy to handle common initialization tasks for all actions / subcommands once
66
66
 
67
67
 
68
68
  Example Program
@@ -26,11 +26,11 @@ CLI Command Parser is a class-based CLI argument parser that defines parameters
26
26
  tools to quickly and easily get started with basic CLIs, and it scales well to support even very large and complex
27
27
  CLIs while remaining readable and easy to maintain.
28
28
 
29
- The primary goals of this project:
30
- - Make it easy to define subcommands and actions in an clean and organized manner
31
- - Allow for inheritance so that common parameters don't need to be repeated
32
- - Make it easy to handle common initialization tasks for all actions / subcommands once
33
- - Reduce the amount of boilerplate code that is necessary for setting up parsing and handling argument values
29
+ Some of the primary goals and key features of this project:
30
+ - Minimal boilerplate code is necessary to define CLI parameters and access their parsed values
31
+ - Easy to use type annotations for CLI parameters
32
+ - Subcommands can inherit common parameters so they don't need to be repeated
33
+ - Easy to handle common initialization tasks for all actions / subcommands once
34
34
 
35
35
 
36
36
  Example Program