From f993ca8f59f9b7741ac7a08e5a012db058f52be9 Mon Sep 17 00:00:00 2001 From: Andy Mikhaylenko Date: Thu, 12 Oct 2023 16:08:55 +0200 Subject: [PATCH] fix: add missed line --- src/argh/assembling.py | 1 + src/argh/dto.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/argh/assembling.py b/src/argh/assembling.py index 5d74cd4..80ada0a 100644 --- a/src/argh/assembling.py +++ b/src/argh/assembling.py @@ -294,6 +294,7 @@ def _merge_inferred_and_declared_args( # arguments declared via @arg decorator for declared_spec in declared_args: + parser_add_argument_spec = declared_spec func_arg_name = parser_add_argument_spec.func_arg_name if func_arg_name in specs_by_func_arg_name: diff --git a/src/argh/dto.py b/src/argh/dto.py index 6b66c7e..e4a32cd 100644 --- a/src/argh/dto.py +++ b/src/argh/dto.py @@ -2,7 +2,7 @@ Data transfer objects for internal usage. """ from dataclasses import dataclass, field -from typing import Any, Callable, Dict, List, Optional, Union, Type +from typing import Any, Callable, Dict, List, Optional, Type, Union class NotDefined: @@ -63,7 +63,9 @@ def get_all_kwargs(self) -> Dict[str, Any]: return dict(kwargs, **self.other_add_parser_kwargs) @classmethod - def make_from_kwargs(cls, func_arg_name, cli_arg_names, parser_add_argument_kwargs: Dict[str, Any]) -> "ParserAddArgumentSpec": + def make_from_kwargs( + cls, func_arg_name, cli_arg_names, parser_add_argument_kwargs: Dict[str, Any] + ) -> "ParserAddArgumentSpec": """ Constructs and returns a `ParserAddArgumentSpec` instance according to keyword arguments according to the