Skip to content

gh-130425: Add "Did you mean [...]" suggestions for del obj.attr - #136588

Merged
encukou merged 23 commits into
python:mainfrom
Pranjal095:delattr-suggestions-re
Aug 22, 2025
Merged

encukou merged 23 commits into
python:mainfrom
Pranjal095:delattr-suggestions-re

Conversation

@Pranjal095

@Pranjal095 Pranjal095 commented Jul 12, 2025 •

Copy link
Copy Markdown
Contributor

This pull request replaces the earlier PR #130799 (now closed) and carries over that set of commits, preserving original authorship and history. An extra commit has been included to address a linting issue that was present in the previous version.

Issue: #130425

Comment thread Lib/test/test_traceback.py Resolved
Comment thread Lib/test/test_traceback.py Resolved
Comment thread Lib/test/test_traceback.py Resolved
Comment thread Lib/test/test_traceback.py Resolved
Comment thread Lib/test/test_traceback.py Resolved
@picnixz picnixz changed the title gh-130425: Add "Did you mean [...]" suggestions for del obj.attr Jul 12, 2025
@picnixz
picnixz requested a review from sobolevn July 12, 2025 15:57
@Pranjal095
Pranjal095 requested a review from picnixz July 12, 2025 18:02
Comment thread Lib/test/test_traceback.py Resolved
Comment thread Objects/dictobject.c Resolved
@Pranjal095
Pranjal095 requested a review from picnixz July 12, 2025 18:35
Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Doc/whatsnew/3.15.rst Resolved
@Pranjal095
Pranjal095 requested a review from picnixz July 12, 2025 18:58
Comment thread Doc/whatsnew/3.15.rst Resolved
@StanFromIreland

Copy link
Copy Markdown
Member

@Pranjal095 Please mark comments as Resolved when you are finished with them, it helps keep the PR organized.

Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Lib/test/test_traceback.py Resolved
@Pranjal095
Pranjal095 requested a review from picnixz July 14, 2025 16:42
Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Lib/test/test_traceback.py Resolved
@Pranjal095
Pranjal095 requested a review from picnixz August 2, 2025 10:56

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now.

I'll let @sobolevn have a look as well as he's credited as a contributor as well.

@Pranjal095
Pranjal095 requested a review from picnixz August 13, 2025 07:22
This allows moving test_suggestions_with_method_call back to
test_getattr_suggestions_underscored, so that delattr is tested
for these as well.
@encukou

encukou commented Aug 19, 2025

Copy link
Copy Markdown
Member

I noticed that some of the setattr tests don't run for delattr, but could. See Pranjal095#1

@Pranjal095
Pranjal095 requested a review from AA-Turner as a code owner August 19, 2025 09:18
@AA-Turner
AA-Turner removed their request for review August 19, 2025 09:22
@Pranjal095

Copy link
Copy Markdown
Contributor Author

Thanks a lot for catching this! I hadn’t noticed the issue myself, and I’m very happy to have merged the changes.

@encukou encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sobolevn, I plan to merge around Friday if there are no objections.

@encukou
encukou merged commit f27af8b into python:main Aug 22, 2025
@Pranjal095
Pranjal095 deleted the delattr-suggestions-re branch August 22, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

7 participants