-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Fix typos in docs and comments in idlelib #13749
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
Conversation
This is similar to #13745 but the raised the changes to idlelib folder as a separate PR to assist backporting workflow for idlelib. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix red builds
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 |
30d58d6
to
b6d15ed
Compare
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did I (and previous spell checks) miss some of these? Thanks for finding these and doing them separately.
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>
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>
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. |
Are you reducing .py files to strings and comments first? |
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
|
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.)
|
Hi @tirkarthi Just came up with the idea. Like the-knights-who-say-ni or bedevere-bot, |
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. |
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. |
I also think it would be great to add this feature to the CI test. For example, trailing whitespace testing. |
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. |
Hi @terryjreedy and @tirkarthi I summarized the discussion above. Consensus:
To be Solved:
Next Step:
MISC:
Is @tirkarthi currently working on interfacing the filter? |
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 |
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. |
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