Skip to content
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

Set IntegerField class variable for compiled decimal regex, comment for ... #2853

Merged
merged 1 commit into from Apr 21, 2015

Conversation

ryangallen
Copy link
Contributor

@ryangallen ryangallen commented Apr 21, 2015

Set IntegerField class variable for compiled decimal regex, comment for purpose

@tomchristie
Copy link
Member

tomchristie commented Apr 21, 2015

Great, thanks! :)

@ryangallen
Copy link
Contributor Author

ryangallen commented Apr 21, 2015

Of course, happy to help. Thanks for the feedback.

tomchristie added a commit that referenced this pull request Apr 21, 2015
Set IntegerField class variable for compiled decimal regex, comment for ...
@tomchristie tomchristie merged commit 0ca1145 into encode:master Apr 21, 2015
@tomchristie tomchristie added this to the 3.1.2 Release milestone Apr 21, 2015
@ryangallen
Copy link
Contributor Author

ryangallen commented Apr 23, 2015

Tom, I just realized the test valid_inputs and outputs in the test don't match. '1.0' is not tested for output. Should the output values be coerced the same way as the input?

def to_representation(self, value):
    return int(self.re_decimal.sub('', str(value)))

Pull: #2870

@tomchristie
Copy link
Member

tomchristie commented Apr 24, 2015

Should the output values be coerced the same way as the input?

I think we should probably pass on that - don't really want to run ever single integer we output through that.

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

Successfully merging this pull request may close these issues.

None yet

2 participants