Skip to content
This repository was archived by the owner on Aug 23, 2026. It is now read-only.

Commit 81522d2

Browse files
Fixes for 2 code quality findings (#5)
* Apply suggested fix to check.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggested fix to check.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 399a4e3 commit 81522d2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

check.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def suggestCorrectionsFromCustomDic(self, typo, distance_limit=3):
8686
min_dist = distance_limit + 1
8787
suggested_word = None
8888

89-
for knownWord in self.dict:
89+
for knownWord in self.custom_dict:
9090
dist = distance(typo, knownWord, score_cutoff=distance_limit)
9191
# Levenshtein.distance returns -1 when the true distance exceeds score_cutoff.
9292
# Ignore such values instead of treating -1 as a better (smaller) distance.
@@ -102,7 +102,7 @@ def isIssueValid(self, issue):
102102
issue.offsetInContext : issue.offsetInContext + issue.errorLength
103103
]
104104

105-
if context in self.dict:
105+
if context in self.custom_dict:
106106
return False
107107
else:
108108
return True
@@ -195,7 +195,7 @@ def main():
195195
language=args.language,
196196
check_source=config["checkSourceString"],
197197
check_translation=config["checkTranslationString"],
198-
dict=config["customDictionary"],
198+
custom_dict=config["customDictionary"],
199199
disabled_rules=config["disabledRules"],
200200
verbose=args.verbose,
201201
)

0 commit comments

Comments
 (0)