Skip to content

Conversation

@safaozturk93
Copy link

Copy link
Member

@funkyfuture funkyfuture left a comment

Choose a reason for hiding this comment

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

there must be at least tests covering the currently undesired behaviour (w/ the intended outcome).

KEYSRULES = KEYSCHEMA = ErrorDefinition(0x83, 'keysrules')
VALUESRULES = VALUESCHEMA = ErrorDefinition(0x84, 'valuesrules')
BAD_ITEMS = ErrorDefinition(0x8f, 'items')
BAD_ITEMS = ErrorDefinition(0x8F, 'items')
Copy link
Member

Choose a reason for hiding this comment

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

that is an unnecessary change.

Copy link
Author

Choose a reason for hiding this comment

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

this violates black reformatting rule in travis pipeline.

elif isinstance(value, int):
if value in forbidden_values:
self._error(field, errors.FORBIDDEN_VALUE, value)
elif isinstance(value, float):
Copy link
Member

Choose a reason for hiding this comment

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

please keep it simple. afaict, there's no need to branch off for float or integer values, only for container values that are not strings.

Copy link
Author

Choose a reason for hiding this comment

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

I will look at it.

@funkyfuture funkyfuture added this to the 1.2.1 milestone Sep 30, 2018
funkyfuture added a commit to funkyfuture/cerberus that referenced this pull request Nov 24, 2018
funkyfuture added a commit to funkyfuture/cerberus that referenced this pull request Nov 24, 2018
@funkyfuture
Copy link
Member

Closing in favour of #455.

funkyfuture added a commit that referenced this pull request Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants