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

silent_catch: Make silent_catch a special case of catch #21

Merged
merged 2 commits into from Mar 4, 2021

Conversation

lhl2617
Copy link
Contributor

@lhl2617 lhl2617 commented Mar 1, 2021

Summary

Reuse code!
Fixes #23

Test plan

Unit tests remain passing.


def catch(_func=None, *, exception=None, handler=None):
def catch(_func=None, *, exception=None, handler=None, silent=False):
Copy link

Choose a reason for hiding this comment

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

Function catch has 5 arguments (exceeds 4 allowed). Consider refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

silence, linter

@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #21 (dc7d9a6) into main (b6cc71a) will increase coverage by 0.56%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   93.16%   93.73%   +0.56%     
==========================================
  Files           9        9              
  Lines         395      383      -12     
==========================================
- Hits          368      359       -9     
+ Misses         27       24       -3     
Impacted Files Coverage Δ
paprika/error_handling.py 90.90% <100.00%> (+5.61%) ⬆️

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 b6cc71a...dc7d9a6. Read the comment docs.

@codeclimate
Copy link

codeclimate bot commented Mar 3, 2021

Code Climate has analyzed commit dc7d9a6 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@rayanht rayanht merged commit 5853d6b into rayanht:main Mar 4, 2021
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.

@silent_catch should be a special case of @catch
2 participants