Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
fran-tirapu committed Aug 5, 2024
1 parent b4e1cec commit d820de7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/codemagic/cli/argument/argument_parser_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import argparse
from typing import TYPE_CHECKING
from typing import Dict
from typing import Optional
from typing import Type

from codemagic.cli.cli_help_formatter import CliHelpFormatter
Expand Down Expand Up @@ -112,10 +113,14 @@ def set_default_cli_options(cls, cli_options_parser):
verbose=False,
)

def _get_custom_argument_group(self, optional_group_name: str, mutually_exclusive_required_group: str) -> ArgumentGroup:
def _get_custom_argument_group(
self,
optional_group_name: Optional[str],
mutually_exclusive_required_group: Optional[str],
) -> ArgumentGroup:
if optional_group_name:
return self._get_custom_optional_argument_group(optional_group_name)
return self._get_custom_mutually_exclusive_required_group(mutually_exclusive_required_group)
return self._get_custom_mutually_exclusive_required_group(str(mutually_exclusive_required_group))

def _get_custom_optional_argument_group(self, group_name: str) -> ArgumentGroup:
try:
Expand Down

0 comments on commit d820de7

Please sign in to comment.