Closed mitar closed 7 years ago
Hello,
Unfortunately I cannot reproduce your issue. Can you provide extra info about your environment so we can pinpoint an exact problem?
Passing test (unittest_checker_spelling.py):
@skip_on_missing_package_or_dict
@set_config(spelling_dict=spell_dict)
def test_github_issue_1605(self):
module_to_check = astroid.parse('''
"""Fit Bernoulli Naive Bayes classifier."""
''')
print(self.checker.spelling_dict.check('Bernoulli')) # True
print(self.checker.spelling_dict.suggest('Bernoulli')) # ['Bernoulli']
with self.assertNoMessages():
self.checker.visit_module(module_to_check)
mac-mini:pylint rogalski$ enchant -v
@(#) International Ispell Version 3.1.20 (but really Enchant 1.6.0)
I made a reproduction here. Running pylint test.py
gives:
************* Module test
C: 3, 0: Wrong spelling of a word 'Bernoulli' in a docstring:
Fit Bernoulli Naive Bayes classifier.
^^^^^^^^^
Did you mean: ''Bernoulli''? (wrong-spelling-in-docstring)
C: 3, 0: Wrong spelling of a word 'Bayes' in a docstring:
Fit Bernoulli Naive Bayes classifier.
^^^^^
Did you mean: ''Bayes' or 'ayes' or 'byes' or 'bays''? (wrong-spelling-in-docstring)
Python 3.5.2
pyenchant==1.6.11
But I do not think binary enchant program is being used. The .so used is the one bundled with pyenchant.
Occurs in 1.7.2, does not occur on master. Fixed in 9946d8b846f83de06ba9b017de2ea6b7f7439fd3
Steps to reproduce
Current behavior
We get the error:
Expected behavior
Or suggest some other word, and not exactly the same word. Or do not show an error.
pylint --version output
Using
pyenchant==1.6.11
andspelling-dict=en_US
.