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
Update .pre-commit-config.yaml #8384
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.10 #8384 +/- ##
==========================================
- Coverage 97.50% 97.43% -0.07%
==========================================
Files 108 108
Lines 33315 33300 -15
Branches 3988 3988
==========================================
- Hits 32483 32446 -37
- Misses 622 626 +4
- Partials 210 228 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -176,7 +176,7 @@ def enable_compression( | |||
) -> None: | |||
"""Enables response compression encoding.""" | |||
# Backwards compatibility for when force was a bool <0.17. | |||
if type(force) == bool: | |||
if isinstance(force, bool): |
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.
Are integers boolean? I remember there were some corner cases a around this. Or perhaps this was done with performance in mind.. FWIW this is not just a formatting change. It checks for subclasses too. Is this necessary?
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.
Are integers boolean
No, other way round. bool is subclass of int, so this shoudn't make any difference. It's also ancient code that could be removed at this point anyway..
marks=pytest.mark.skipif( | ||
not hasattr(socket, "AF_UNIX"), reason="It's a UNIX-only module" | ||
), | ||
( |
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.
Which linter wanted this? It seems like too much..
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.
Isn't this one just black formatting? I didn't touch this one.
ClientConnectionError, | ||
match=expected_exception_reason, | ||
) as conn_err: | ||
await sess.get(url, proxy=secure_proxy_url, ssl=client_ssl_ctx) | ||
|
||
assert type(conn_err.value.__cause__) == TypeError |
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.
I'm pretty sure the exact class is expected here..
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.
Didn't think it would make a difference. Feel free to revert and add a noqa.
No description provided.