Skip to content

Inform about no explicit export instead of attribute suggestions - #9237

Merged
hauntsaninja merged 3 commits into
python:masterfrom
kamilturek:attr-suggestions-no-implicit-reexport
Sep 13, 2020
Merged

hauntsaninja merged 3 commits into
python:masterfrom
kamilturek:attr-suggestions-no-implicit-reexport

Conversation

@kamilturek

Copy link
Copy Markdown
Contributor

Fixes #9084

@bluetech

bluetech commented Aug 1, 2020

Copy link
Copy Markdown
Contributor

This is a helpful improvement.

The message in your first version of the patch is a bit more understandable than the second IMO (the "Append to message instead of overwriting" commit). Interested why you changed it.

@kamilturek

Copy link
Copy Markdown
Contributor Author

This is a helpful improvement.

The message in your first version of the patch is a bit more understandable than the second IMO (the "Append to message instead of overwriting" commit). Interested why you changed it.

I didn't want to so radically change the message, but I may bring it back as it is more understable.

@bluetech

bluetech commented Aug 1, 2020

Copy link
Copy Markdown
Contributor

Yes, I can see this.

Perhaps the right thing to do it give it an entirely new error code, like attr-exported, instead of attr-defined. Not sure what is the policy regarding the granularity of these though.

@JukkaL

JukkaL commented Aug 14, 2020

Copy link
Copy Markdown
Collaborator

Not sure what is the policy regarding the granularity of these though.

The policy on error codes is that if there's a realistic use case where having a separate error code would help, or if some error message can be confusing and providing more context via an error code (which can be looked up from the docs) can be helpful, splitting an error code may be reasonable.

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the improving the error message! The original error messages was quite confusing. Looks good.

By the way, I also kind of like the message in the first commit. Feel free to change it back if you like. (Or maybe also add " (implicit reexport disabled)" to the end to make this even clearer?)

@kamilturek

Copy link
Copy Markdown
Contributor Author

I have changed back the message and appended "implicit reexport disabled".

@kamilturek
kamilturek requested a review from JukkaL August 14, 2020 20:23
@hauntsaninja
hauntsaninja merged commit 4325aae into python:master Sep 13, 2020
@hauntsaninja

Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"has no attribute" then suggests another missing attribute

4 participants