-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix type hint for tracing Signal sequence content #3596
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3596 +/- ##
==========================================
- Coverage 97.9% 94.83% -3.08%
==========================================
Files 43 43
Lines 8556 8555 -1
Branches 1376 1375 -1
==========================================
- Hits 8377 8113 -264
- Misses 74 337 +263
Partials 105 105
Continue to review full report at Codecov.
|
d401685
to
1d6e774
Compare
The Signal is instantiated with a TraceConfig object but does not store it in its mutable sequence. Fixed hinting to reflect what is expected to be added as signal handler.
1d6e774
to
dbd4ae6
Compare
Suddenly, this patch doesn't fixes the issue. I run it against your snippet and still get an error:
|
I think I see the problem. Looks like I changed the return type of the |
* Update cython from 0.29.2 to 0.29.5 * Update cython from 0.29.2 to 0.29.5 * Update cython from 0.29.2 to 0.29.5 * Update pytest from 4.1.1 to 4.2.0 * Update pytest from 4.1.1 to 4.2.0 * Update pytest-mock from 1.10.0 to 1.10.1 * Update trustme from 0.4.0 to 0.5.0 (Refs: aio-libs#3599, aio-libs#3506) * Update aiodns from 1.1.1 to 1.2.0 * Update uvloop from 0.11.3 to 0.12.0 * Update flake8 from 3.6.0 to 3.7.5 * Update mypy from 0.660 to 0.670 * Update sphinx from 1.8.3 to 1.8.4 * Update cherry_picker from 1.2.1 to 1.2.2
That's odd. Was sure that this passed for me but I see that it fails now again. I made it really ugly now but it passes. Type hints are still a mystery to me. |
Stefan Tjarks seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
thanks! |
* Fix type hint for tracing Signal sequence content The Signal is instantiated with a TraceConfig object but does not store it in its mutable sequence. Fixed hinting to reflect what is expected to be added as signal handler.
The Signal is instantiated with a TraceConfig object but does not store
it in its mutable sequence. Fixed hinting to reflect what is expected to
be added as signal handler.
What do these changes do?
Fix type hint for tracing Signal contents. They got very long with the last argument being a
Union
, maybe anAny
would do instead?Are there changes in behavior for the user?
mypy does not report an error of
error: List item 0 has incompatible type "Callable[[ClientSession, SimpleNamespace, TraceConnectionCreateEndParams], Coroutine[Any, Any, None]]"; expected "Callable[[TraceConfig], Awaitable[None]]"
Related issue number
#3595
Checklist
CONTRIBUTORS.txt
CHANGES
folder