-
Notifications
You must be signed in to change notification settings - Fork 5
test with starlette 0.15.0 on trio and asyncio (Sourcery refactored) #9
base: master
Are you sure you want to change the base?
Conversation
a91cc89 to
cec4579
Compare
| try: | ||
| self.connection.quit() | ||
| except smtplib.SMTPServerDisconnected: | ||
| # This happens when calling quit() on a TLS connection | ||
| # sometimes, or when the connection was already disconnected | ||
| # by the server. | ||
| self.connection.close() | ||
| except smtplib.SMTPException: | ||
| if self.fail_silently: | ||
| return | ||
| raise | ||
| self.connection.quit() | ||
| except smtplib.SMTPServerDisconnected: | ||
| # This happens when calling quit() on a TLS connection | ||
| # sometimes, or when the connection was already disconnected | ||
| # by the server. | ||
| self.connection.close() | ||
| except smtplib.SMTPException: | ||
| if self.fail_silently: | ||
| return | ||
| raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function EmailBackend.close refactored with the following changes:
- Merge nested try-statement into a single try (
flatten-nested-try)
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.30%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Codecov Report
@@ Coverage Diff @@
## master #9 +/- ##
==========================================
- Coverage 78.19% 77.84% -0.35%
==========================================
Files 14 14
Lines 509 510 +1
==========================================
- Hits 398 397 -1
- Misses 111 113 +2
Continue to review full report at Codecov.
|
Pull Request #8 refactored by Sourcery.
Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.
To incorporate these changes, you can either:
Merge this Pull Request instead of the original, or
Ask your contributor to locally incorporate these commits and push them to
the original Pull Request
Incorporate changes via command line
NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Help us improve this pull request!