Better error messages from Final and NoPublicConstructor#1497
Merged
pquentin merged 2 commits intopython-trio:masterfrom May 8, 2020
Merged
Better error messages from Final and NoPublicConstructor#1497pquentin merged 2 commits intopython-trio:masterfrom
pquentin merged 2 commits intopython-trio:masterfrom
Conversation
This is a pretty trivial change, but I noticed it while working on python-triogh-1496 so I figured I'd just fix it.
Codecov Report
@@ Coverage Diff @@
## master #1497 +/- ##
==========================================
+ Coverage 92.76% 99.67% +6.91%
==========================================
Files 107 107
Lines 13220 13200 -20
Branches 995 995
==========================================
+ Hits 12263 13157 +894
+ Misses 904 28 -876
+ Partials 53 15 -38
|
oremanj
reviewed
May 6, 2020
trio/_util.py
Outdated
| raise TypeError( | ||
| "`%s` does not support subclassing" % base.__name__ | ||
| "the {!r} class does not support subclassing".format( | ||
| base.__name__ |
Member
There was a problem hiding this comment.
Do we want to do {__module__}.{__qualname__} for maximum comprehensibility?
Member
|
LGTM, one optional suggestion |
Member
Author
|
(Also, whoa, I just realized we can use f-strings now!) |
pquentin
approved these changes
May 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a pretty trivial change, but I noticed it while working on
gh-1496 so I figured I'd just fix it.