Fix typos in docs and comments in idlelib#13749
Conversation
|
This is similar to #13745 but the raised the changes to idlelib folder as a separate PR to assist backporting workflow for idlelib. |
Sorry, something went wrong.
asvetlov
left a comment
There was a problem hiding this comment.
Please fix red builds
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
30d58d6 to
b6d15ed
Compare
June 2, 2019 20:29
|
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. |
Sorry, something went wrong.
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.
Sorry, something went wrong.
|
Thanks @tirkarthi for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Sorry, something went wrong.
(cherry picked from commit d9677f3) Co-authored-by: Xtreak <tir.karthi@gmail.com>
(cherry picked from commit d9677f3) Co-authored-by: Xtreak <tir.karthi@gmail.com>
|
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. |
Sorry, something went wrong.
|
Are you reducing .py files to strings and comments first? |
Sorry, something went wrong.
|
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
|
Sorry, something went wrong.
|
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.) |
Sorry, something went wrong.
|
Hi @tirkarthi Just came up with the idea. Like the-knights-who-say-ni or bedevere-bot, |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
I also think it would be great to add this feature to the CI test. For example, trailing whitespace testing. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Hi @terryjreedy and @tirkarthi I summarized the discussion above. Consensus:
To be Solved:
Next Step:
MISC:
Is @tirkarthi currently working on interfacing the filter? |
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Thanks @terryjreedy , I'll move the discussion to core-workflow repository. :D |
Sorry, something went wrong.
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