Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Refactor formatter for model-derived typing #243

Merged
merged 1 commit into from
Oct 15, 2014
Merged

Refactor formatter for model-derived typing #243

merged 1 commit into from
Oct 15, 2014

Conversation

bruth
Copy link
Contributor

@bruth bruth commented Oct 15, 2014

This improves formatter processing to consider the DataConcept and
DataField type fields introduced in 878a313 and cddcd9b,
respectively. In addition, the DataField's simple type is included as
a fallback prior to using the 'raw' format.

This removes the need for Formatter.default_formats and reduces the
number of the preferred_formats across the exporter classes.

Fix #242

Signed-off-by: Byron Ruth b@devel.io

values = OrderedDict(zip(self.keys, values))

# Create a copy of the preferred formats since each set values may
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify ...formats since each set values map.... That part of the sentence is confusing.

This improves formatter processing to consider the `DataConcept` and
`DataField` `type` fields introduced in 878a313 and cddcd9b,
respectively. In addition, the `DataField`'s simple type is included as
a fallback prior to using the 'raw' format.

This removes the need for `Formatter.default_formats` and reduces the
number of the `preferred_formats` across the exporter classes.

Fix #242

Signed-off-by: Byron Ruth <b@devel.io>
naegelyd added a commit that referenced this pull request Oct 15, 2014
Refactor formatter for model-derived typing
@naegelyd naegelyd merged commit b277e5b into master Oct 15, 2014
@naegelyd naegelyd deleted the issue-242 branch October 15, 2014 18:38
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling 8ceb4ac on issue-242 into e368dc2 on master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change default formats to be based on the field type
3 participants