Skip to content

Adding __str__ method to improve errors readability#94

Merged
jrxFive merged 2 commits intojrxFive:masterfrom
SlipJ:exceptions-str
Oct 8, 2019
Merged

Adding __str__ method to improve errors readability#94
jrxFive merged 2 commits intojrxFive:masterfrom
SlipJ:exceptions-str

Conversation

@SlipJ
Copy link

@SlipJ SlipJ commented Sep 9, 2019

Improving the custom errors readability so that it will also include the response that caused it.
Also removing the inherited init method.

@codecov-io
Copy link

codecov-io commented Sep 9, 2019

Codecov Report

Merging #94 into master will decrease coverage by 0.13%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #94      +/-   ##
=========================================
- Coverage   91.23%   91.1%   -0.14%     
=========================================
  Files          26      26              
  Lines        1038    1034       -4     
=========================================
- Hits          947     942       -5     
- Misses         91      92       +1
Impacted Files Coverage Δ
nomad/api/exceptions.py 88.88% <50%> (-11.12%) ⬇️

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 b74ac41...8fca9e4. Read the comment docs.

def __init__(self, nomad_resp):
self.nomad_resp = nomad_resp

pass
Copy link

Choose a reason for hiding this comment

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

pass is only required if you don't have a docstring.

@jrxFive
Copy link
Owner

jrxFive commented Oct 8, 2019

Hey @SlipJ, thanks so much for the PR/improvement to the exception string dunder!

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.

4 participants