-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Codespell doesn't offer to capitalize word result if it doesn't start with the same first letter (?) #1883
Comments
I can't see this in the dictionary @luzpaz . Is it personal custom dictionary? |
No... this is not a custom dictionary. And I'm not referring to how the words are displayed in the custom dictionary. This is specifically related to the logic that is used by codespell to capitalize/capital-case the suggested correctly-spelled words because the typo itself was capitalized/capital-cased. Make sense? |
Ah, which version are you running? I tried various searches via GitHub and failed to find it, but by inspecting the dictionary: codespell/codespell_lib/data/dictionary.txt Line 24590 in f22aa4a
Please can you also share the whole line it's matching on and any command line flags/config you're using. Also hopefully there's a PR to add reverb as a suggestion? |
Edit, agreed, it's broken:
fix_case needs erm fixing. Well some tests adding first. It needs a for each around each suggestion individually, but also a quick check the reason isn't getting passed to it if present: codespell/codespell_lib/_codespell.py Lines 471 to 478 in 079b649
|
Ah, I see @peternewman: the problem is that fix_case("Rever", "revert, refer, fever") So it's capitalizing |
Exactly. But the fix is not to just do a naive split, as the last one shouldn't be capitalised because it's a potential note. |
Oh, that's a good point. So maybe we should change codespell/codespell_lib/_codespell.py Lines 454 to 479 in 7db90e0
I could easily undertake it. |
I think that handles it already, and |
@DimitriPapadopoulos fixed this in #2223
But something like this would be good still @bl-ue ! |
./src/effects/Reverb.cpp:455: Rever ==> Revert, fever
In the analysis example above
fever
is not capitalizedThe text was updated successfully, but these errors were encountered: