-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for named tuples to pretty #2031
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2031 +/- ##
=======================================
Coverage 99.81% 99.81%
=======================================
Files 71 71
Lines 7058 7088 +30
=======================================
+ Hits 7045 7075 +30
Misses 13 13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Mainly just detecting if __repr__
has been overriden.
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.
Introspection is tricky
Sorry about that - should be ready for another round now @willmcgugan |
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.
LGTM
Type of changes
Checklist
Description
Closes #2012
Named tuples will be formatted similarly to dataclasses when formatted using the
pretty
module. The code for handling this is very similar to dataclasses, but I opted not to try and factor it out as I think it will reduce readability.