Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInclude "special" _octodns values in Record.__repr__ #292
Conversation
Btw, I'm not really sure about this PR. I'd like to show the special bits, but worried that it'll end up confusing things as much as helping... |
@@ -10,6 +10,16 @@ | |||
import re | |||
|
|||
|
|||
def _stringify(d, prefix=''): | |||
buf = [] | |||
for k, v in sorted(d.items()): |
This comment has been minimized.
This comment has been minimized.
begincalendar
Nov 3, 2018
I think this produces a clearer result:
if isinstance(v, dict):
buf.append(_stringify(v, '{}{}.'.format(prefix, k)))
else:
buf.append('{}{}={}'.format(prefix, k, v))
What do you think?
begincalendar
commented
Nov 3, 2018
I think it gets the job done. |
I dig this! Here's an example:
|
Hm; the AliasRecord there wasn't changed by me, so looks like a diff is found there when nothing was changed? The keltermoore.com change was purposeful. |
The AliasRecord diff doesn't get printed on
|
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.
ross commentedNov 3, 2018
This includes the
octodns
bits inRecord.__repr__
. The upside of this is that you can see the special bits that may be pushed to your providers, downside is that it could be noisy and not all special things apply to all providers and things pulled out of providers will only include the things that provider knows about.Example of the "good" case, CF proxied
Example of the "bad" case, where things aren't super clear
/cc #284
/cc @parkr @begincalendar