Skip to content

Commit 2658c00

Browse files
authored
spelling fix (#10023)
1 parent d924d93 commit 2658c00

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

xarray/core/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ def did_you_mean(
119119
word: Hashable, possibilities: Iterable[Hashable], *, n: int = 10
120120
) -> str:
121121
"""
122-
Suggest a few correct words based on a list of possibilites
122+
Suggest a few correct words based on a list of possibilities
123123
124124
Parameters
125125
----------
126126
word : Hashable
127-
Word to compare to a list of possibilites.
127+
Word to compare to a list of possibilities.
128128
possibilities : Iterable of Hashable
129129
The iterable of Hashable that contains the correct values.
130130
n : int, default: 10
@@ -142,15 +142,15 @@ def did_you_mean(
142142
https://en.wikipedia.org/wiki/String_metric
143143
"""
144144
# Convert all values to string, get_close_matches doesn't handle all hashables:
145-
possibilites_str: dict[str, Hashable] = {str(k): k for k in possibilities}
145+
possibilities_str: dict[str, Hashable] = {str(k): k for k in possibilities}
146146

147147
msg = ""
148148
if len(
149149
best_str := difflib.get_close_matches(
150-
str(word), list(possibilites_str.keys()), n=n
150+
str(word), list(possibilities_str.keys()), n=n
151151
)
152152
):
153-
best = tuple(possibilites_str[k] for k in best_str)
153+
best = tuple(possibilities_str[k] for k in best_str)
154154
msg = f"Did you mean one of {best}?"
155155

156156
return msg

0 commit comments

Comments
 (0)