Skip to content

Commit

Permalink
Fixed type hint in unit test code
Browse files Browse the repository at this point in the history
  • Loading branch information
kmvanbrunt committed Feb 23, 2022
1 parent d14fbc1 commit fde6b72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_argparse_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import argparse
import numbers
from typing import (
Dict,
List,
cast,
)
Expand Down Expand Up @@ -285,12 +286,12 @@ def do_raise_completion_error(self, args: argparse.Namespace) -> None:
############################################################################################################
# Begin code related to receiving arg_tokens
############################################################################################################
def choices_takes_arg_tokens(self, arg_tokens: argparse.Namespace) -> List[str]:
def choices_takes_arg_tokens(self, arg_tokens: Dict[str, List[str]]) -> List[str]:
"""Choices function that receives arg_tokens from ArgparseCompleter"""
return [arg_tokens['parent_arg'][0], arg_tokens['subcommand'][0]]

def completer_takes_arg_tokens(
self, text: str, line: str, begidx: int, endidx: int, arg_tokens: argparse.Namespace
self, text: str, line: str, begidx: int, endidx: int, arg_tokens: Dict[str, List[str]]
) -> List[str]:
"""Completer function that receives arg_tokens from ArgparseCompleter"""
match_against = [arg_tokens['parent_arg'][0], arg_tokens['subcommand'][0]]
Expand Down

0 comments on commit fde6b72

Please sign in to comment.