Skip to content

Commit

Permalink
Merge pull request #16 from mazulo/mazulo/update-get-suggestions
Browse files Browse the repository at this point in the history
Update get_suggestions method
  • Loading branch information
mazulo committed Oct 11, 2022
2 parents cb01bd2 + 0574984 commit 24b337a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# misspelling
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)

## Spell checker for code

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "misspelling"
version = "2.0.4"
version = "2.0.5"
description = "This is a Python library and tool to check for misspelled words in source code."
authors = ["Patrick Mazulo <pmazulo@gmail.com>"]
license = "GNU GENERAL PUBLIC LICENSE"
Expand Down
4 changes: 2 additions & 2 deletions src/misspelling_lib/misspelling_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def get_suggestions(self, word: str) -> List[str]:
List of zero or more suggested replacements for word.
"""
suggestions = set(self._misspelling_dict.get(word, set())).union(
set(self._misspelling_dict.get(word.lower(), set()))
suggestions = set(self._misspelling_dict.get(word, [])).union(
set(self._misspelling_dict.get(word.lower(), []))
)
return sorted(same_case(source=word, destination=w) for w in suggestions)

Expand Down
2 changes: 1 addition & 1 deletion src/misspelling_lib/utils/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get_version() -> str:
return "2.0.4"
return "2.0.5"

0 comments on commit 24b337a

Please sign in to comment.