Skip to content
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

Inform about no explicit export instead of attribute suggestions #9237

Merged
merged 3 commits into from
Sep 13, 2020
Merged

Inform about no explicit export instead of attribute suggestions #9237

merged 3 commits into from
Sep 13, 2020

Conversation

kamilturek
Copy link
Contributor

Fixes #9084

@bluetech
Copy link
Contributor

bluetech commented Aug 1, 2020

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
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
Copy link
Contributor

bluetech commented Aug 1, 2020

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
Copy link
Collaborator

JukkaL commented Aug 14, 2020

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.

Copy link
Collaborator

@JukkaL JukkaL left a comment

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
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
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