Skip to content

Commit

Permalink
changes to make sphinx work and ordered the imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Martinez authored and anselor committed Aug 4, 2023
1 parent 2a6fab4 commit b5befb1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmd2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import sys
import threading
import unicodedata
from difflib import SequenceMatcher
from difflib import (
SequenceMatcher,
)
from enum import (
Enum,
)
Expand Down Expand Up @@ -1278,14 +1280,14 @@ def suggest_similar(
requested_command: str, options: Iterable[str], similarity_function_to_use: Optional[Callable[[str, str], float]] = None
) -> Optional[str]:
"""
Given a requested command and an iterable of possible options
returns the most similar (if any is similar)
Given a requested command and an iterable of possible options returns the most similar (if any is similar)
:param requested_command: The command entered by the user
:param options: The list of avaiable commands to search for the most similar
:param options: The list of available commands to search for the most similar
:param similarity_function_to_use: An optional callable to use to compare commands
:returns The most similar command or None if no one is similar
:return: The most similar command or None if no one is similar
"""

proposed_command = None
best_simil = MIN_SIMIL_TO_CONSIDER
requested_command_to_compare = requested_command.lower()
Expand Down

0 comments on commit b5befb1

Please sign in to comment.