Conversation
Codecov Report
@@ Coverage Diff @@
## main #238 +/- ##
==========================================
+ Coverage 51.64% 51.65% +0.01%
==========================================
Files 37 37
Lines 8390 8392 +2
Branches 1789 1789
==========================================
+ Hits 4333 4335 +2
Misses 3743 3743
Partials 314 314
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| @@ -45,6 +45,13 @@ | |||
| help=('Wraps the response in a response class') | |||
| ) | |||
|
|
|||
There was a problem hiding this comment.
nit: Remove extra line
|
|
||
|
|
||
| def fmt_error_type(data_type): | ||
| def fmt_error_type(data_type, wrap_error_in=''): |
There was a problem hiding this comment.
nit: Can't we just default this to wrap_error_in='Error'
There was a problem hiding this comment.
We do need to default to '' becuase that is what comes in if the flag isn't set, so this would have to be checked when we call it and I think its better to abstract that here
| Converts the error type into a JSDoc type. | ||
| """ | ||
| return 'Error.<%s>' % fmt_type(data_type) | ||
| return '%s.<%s>' % ((wrap_error_in if (wrap_error_in != '') else 'Error'), fmt_type(data_type)) |
There was a problem hiding this comment.
nit: And then update this to: return '%s.<%s>' % (wrap_error_in, fmt_type(data_type))
| @@ -67,6 +67,13 @@ | |||
| help=('Wraps the response in a response class') | |||
| ) | |||
|
|
|||
There was a problem hiding this comment.
nit: Remove extra line
|
|
||
|
|
||
| def fmt_error_type(data_type, inside_namespace=None): | ||
| def fmt_error_type(data_type, inside_namespace=None, wrap_error_in=''): |
There was a problem hiding this comment.
nit: Same here - just default to wrap_error_in='Error'
| """ | ||
| return 'Error<%s>' % fmt_type(data_type, inside_namespace) | ||
| return '%s<%s>' % ( | ||
| (wrap_error_in if (wrap_error_in != '') else 'Error'), |
There was a problem hiding this comment.
nit: Same here - and then update to only wrap_error_in
Checklist
General Contributing
Is This a Code Change?
Validation
tox?