Merged
Conversation
Implemented in `type`, `subtype`, `notes` fields
Collaborator
Author
17o2
commented
Jul 5, 2020
| wire_type = f', {remove_line_breaks(shared["type"])}' if 'type' in shared else '' | ||
| gauge_name = f', {shared["gauge"]} {shared["gauge_unit"]}' if 'gauge' in shared else '' | ||
| wire_type = f', {remove_line_breaks(shared["type"])}' if shared.get('type', None) else '' | ||
| gauge_name = f', {shared["gauge"]} {shared["gauge_unit"]}' if shared.get('gauge', None) else '' |
Collaborator
Author
There was a problem hiding this comment.
The new syntax catches both missing keys and keys with None as value.
17o2
commented
Jul 5, 2020
| # add each wire from each bundle to the wirelist | ||
| for index, color in enumerate(bundle.colors, 0): | ||
| wirelist.append({'gauge': bundle.gauge, 'gauge_unit': bundle.gauge_unit, 'length': bundle.length, 'color': color, 'designator': bundle.name, | ||
| wirelist.append({'type': bundle.type, 'gauge': bundle.gauge, 'gauge_unit': bundle.gauge_unit, 'length': bundle.length, 'color': color, 'designator': bundle.name, |
Collaborator
Author
There was a problem hiding this comment.
We were ignoring the type for bundles. In general, I see no reason to.
Contributor
|
This looks good to me, I think you have got all the fields that make sense to add line-breaks to and i couldn't spot any places those fields are printed which doesn't go through one of the three line break functions. |
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.

Closes #49. @Tyler-Ward perhaps you can can have a quick look and let me know if something's missing.
I am aware that ferrules are not rendered very nicely if their fields include line breaks (try my test code) so I'll tackle that next. It's a cosmetic issue not related to the actual line break support.