lockss-pybasic 0.1.0.dev19__tar.gz → 0.1.0.dev21__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lockss-pybasic
3
- Version: 0.1.0.dev19
3
+ Version: 0.1.0.dev21
4
4
  Summary: Basic Python utilities
5
5
  License: BSD-3-Clause
6
6
  Author: Thib Guicherd-Callin
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lockss-pybasic"
3
- version = "0.1.0-dev19"
3
+ version = "0.1.0-dev21"
4
4
  description = "Basic Python utilities"
5
5
  authors = [
6
6
  { name = "Thib Guicherd-Callin", email = "thib@cs.stanford.edu" }
@@ -36,4 +36,4 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
36
  POSSIBILITY OF SUCH DAMAGE.
37
37
  '''.strip()
38
38
 
39
- __version__ = '0.1.0-dev19'
39
+ __version__ = '0.1.0-dev21'
@@ -36,7 +36,7 @@ from collections.abc import Callable
36
36
  import sys
37
37
  from typing import Any, Dict, Generic, Optional, TypeVar
38
38
 
39
- from pydantic.v1 import BaseModel, Field
39
+ from pydantic.v1 import BaseModel
40
40
  from pydantic_argparse import ArgumentParser
41
41
  from rich_argparse import RichHelpFormatter
42
42
 
@@ -100,7 +100,7 @@ class BaseCli(Generic[BaseModelT]):
100
100
  ``prog`` and ``description`` from the constructor keyword
101
101
  arguments in ``self.parser``.
102
102
 
103
- * Stores the Pydantic-Argparse parsed arguemnts in ``self.args``.
103
+ * Stores the Pydantic-Argparse parsed arguments in ``self.args``.
104
104
 
105
105
  * Calls ``dispatch()``.
106
106
 
@@ -142,12 +142,12 @@ class BaseCli(Generic[BaseModelT]):
142
142
  'argparse.metavar': f'bold {cls.styles["argparse.metavar"]}',
143
143
  'argparse.prog': f'bold {cls.styles["argparse.prog"]}',
144
144
  })
145
- def _add_formatter_class(container):
145
+ def __add_formatter_class(container):
146
146
  container.formatter_class = RichHelpFormatter
147
- if container._subcommands:
148
- for subcommand in container._subcommands:
149
- _add_formatter_class(subcommand)
150
- _add_formatter_class(self._parser)
147
+ if container._subparsers:
148
+ for x in container._subparsers:
149
+ __add_formatter_class(x)
150
+ __add_formatter_class(self._parser)
151
151
 
152
152
 
153
153
  def at_most_one_from_enum(model_cls, values: Dict[str, Any], enum_cls) -> Dict[str, Any]: