Uh oh!
There was an error while loading. Please reload this page.
Fix typos in docs and comments in idlelib - #13749
Conversation
tirkarthi
commented
Jun 2, 2019
This is similar to #13745 but the raised the changes to idlelib folder as a separate PR to assist backporting workflow for idlelib. |
bedevere-bot
commented
Jun 2, 2019
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
tirkarthi
commented
Jun 2, 2019
I am not sure why code comments changes cause test failure and especially it happens in test_asyncio and not idlelib related test failure. I have rebased and retriggered the run. |
terryjreedy
left a comment
There was a problem hiding this comment.
How did I (and previous spell checks) miss some of these? Thanks for finding these and doing them separately.
miss-islington
commented
Jun 3, 2019
Thanks @tirkarthi for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
(cherry picked from commit d9677f3) Co-authored-by: Xtreak <tir.karthi@gmail.com>
bedevere-bot
commented
Jun 3, 2019
GH-13770 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit d9677f3) Co-authored-by: Xtreak <tir.karthi@gmail.com>
tirkarthi
commented
Jun 3, 2019
Since new docs are added everyday I just try to run the spell check every 2-3 months. I use aspell and it reports lot of false positives like variable names, function names, tests etc. For Docs folder it reports 10k words and Lib folder 30k words as typos. Hence manual skimming is required and sometimes I overlook the typo to find it next time. |
terryjreedy
commented
Jun 3, 2019
Are you reducing .py files to strings and comments first? |
tirkarthi
commented
Jun 3, 2019
aspell takes the input and splits it into words based on word boundary I think to get all words from the source. Below is the command I use
|
terryjreedy
commented
Jun 3, 2019
The following, using the regexes in idlelib.colorizer, strips a file down to comments and strings. If you could feed the output for all (idlelib or other stdlib) py files to aspell, there would be less to wade through, as the result have only a small fraction of the variable names. (Since I am on Windows and don't know the aspell API, I cannot be more specific.) |
18z
commented
Jun 4, 2019
Hi @tirkarthi Just came up with the idea. Like the-knights-who-say-ni or bedevere-bot, |
18z
commented
Jun 4, 2019
More details. Every time when the typo checker finds a typo, it warns the PR submitter. It is okay, if the typos were found and submitter doesn't fix it. |
terryjreedy
commented
Jun 4, 2019
I had that in the back of my mind when I posted the code above. However, the problem is that even after reducing the code checked, there will still be mostly false positives, and for many modules, there will always be false positives. @tirkarthi could get some numbers after interfacing the filter with aspell. And of course, the bot would have to have aspell available. The report could be made optional with a spellcheck label. |
krnick
commented
Jun 4, 2019
I also think it would be great to add this feature to the CI test. For example, trailing whitespace testing. |
tirkarthi
commented
Jun 4, 2019
I share the same concern about high number of false positives. I mostly took the code from the rust-lang book where there is a separate dictionary.txt file with list of false positives and this shell script to check spelling. It can work at the scale of book but not sure about Python docs, code level docstrings and comments that can have lot of variables, function names and so on that there is a higher rate of changes to keep updating dictionary.txt. |
18z
commented
Jun 5, 2019
Hi @terryjreedy and @tirkarthi I summarized the discussion above. Consensus:
To be Solved:
Next Step:
MISC:
Is @tirkarthi currently working on interfacing the filter? |
tirkarthi
commented
Jun 5, 2019
No, I am not working on the filters data or improving aspell side and manual check for every 2-3 months seems good. Feel free to continue with the approach and I may not have time to continue with this. Thanks |
terryjreedy
commented
Jun 5, 2019
Further general discussion should be on the core-workflow list. A specific proposal for git should be an issue for the core-workflow repository, which I believe is where bots originate. |
18z
commented
Jun 6, 2019
Thanks @terryjreedy , I'll move the discussion to core-workflow repository. :D |
extenstons -> extensions
Attrbutes -> Attributes
delagator -> delegator
diplayable -> displayable
corresonding -> corresponding
examime -> examine
contination -> continuation
seach -> search
create_widgers -> create_widgets
Double-cliking -> Double-clicking
tkintter -> tkinter