ErrorDetail: add eq/ne and repr by blueyed · Pull Request #5787 · encode/django-rest-framework (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation2 Commits1 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

blueyed

This mainly adds __eq__ to handle code in comparisons.

When comparing an ErrorDetail to a string (missing code there) the
ErrorDetail's code is ignored, but otherwise it is taken into account.

@blueyed

This mainly adds __eq__ to handle code in comparisons.

When comparing an ErrorDetail to a string (missing code there) the ErrorDetail's code is ignored, but otherwise it is taken into account.

@blueyed

I've stumbled across the missing __eq__ when using ErrorDetail in the test assertion for #5785.

carltongibson

Choose a reason for hiding this comment

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

This looks OK.

pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request

Nov 17, 2020

@blueyed

This adds __eq__ to handle code in comparisons.

When comparing an ErrorDetail to a string (missing code there) the ErrorDetail's code is ignored, but otherwise it is taken into account.

2 participants

@blueyed @carltongibson