Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
klebster2 committed Nov 3, 2024
1 parent c79091b commit ca03a05
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions python/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ def get_synonyms(self, word: str) -> t.List[t.Dict[str, t.Any]]:
if isinstance(synset, wn.Synset):
for lemma in synset.lemmas():
if lemma.lower() != word.lower():
synset_definition: str | None = (
synset.definition()
) # pylint: disable=unsupported-assignment-operation
synset_definition: t.Optional[str] = synset.definition()
if synset_definition is None:
synset_definition = ""
_item = self.format_completion_item(
Expand All @@ -107,9 +105,7 @@ def get_hyponyms(self, word: str) -> t.List[t.Dict[str, t.Any]]:
for synset in self.get_synsets(word): # pylint: disable=no-value-for-parameter
for hyponym in synset.hyponyms():
for lemma in hyponym.lemmas():
hyponym_definition: str | None = (
hyponym.definition()
) # pylint: disable=unsupported-assignment-operation
hyponym_definition: t.Optional[str] = hyponym.definition()
if hyponym_definition is None:
hyponym_definition = ""

Expand All @@ -128,7 +124,7 @@ def get_meronyms(self, word: str) -> t.List[t.Dict[str, t.Any]]:
# Get both part and substance meronyms
for meronym in synset.meronyms():
for lemma in meronym.lemmas():
meronym_definition: str | None = (
meronym_definition: t.Optional[str] = (
meronym.definition()
) # pylint: disable=unsupported-assignment-operation
if meronym_definition is None:
Expand Down

0 comments on commit ca03a05

Please sign in to comment.