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

[WIP] Structured errors #267

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

[WIP] Structured errors #267

wants to merge 2 commits into from

Conversation

fwkoch
Copy link
Contributor

@fwkoch fwkoch commented Jan 16, 2019

This work is in response to comments here: #263

Verbose error messages are now constructed through the __str__ method.
Error tuples still exist as an @Property for backwards compatibility
@codecov
Copy link

codecov bot commented Jan 16, 2019

Codecov Report

Merging #267 into dev will increase coverage by 0.44%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #267      +/-   ##
==========================================
+ Coverage   96.36%   96.81%   +0.44%     
==========================================
  Files          17       17              
  Lines        2366     2603     +237     
==========================================
+ Hits         2280     2520     +240     
+ Misses         86       83       -3
Impacted Files Coverage Δ
properties/basic.py 98.36% <100%> (+1.29%) ⬆️
properties/base/base.py 99.07% <100%> (-0.02%) ⬇️
properties/base/instance.py 96.7% <100%> (ø) ⬆️
properties/utils.py 97.01% <100%> (+0.46%) ⬆️
properties/base/union.py 95.89% <66.66%> (-1.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 559a9f7...3d10224. Read the comment docs.

if not getattr(instance, '_getting_validated', True):
instance._error_hook(self.error_tuples) #pylint: disable=protected-access

def __str__(self, tab=1, prefix='- '):
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest __unicode__ and having a __str__ stub that returns the str version of the __unicode__

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