-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Why does Threading.Timer 'function' expect None as return type? #3782
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
Comments
I agree, it should be |
I was working on getting the unit tests up and running, but had some trouble. My normal environment is on Windows (with Anaconda) but this failed to build a wheel for When running
|
I think that's probably just expected differences due to names being present only on some OSs; maybe @hauntsaninja can confirm. An easier way to run the tests is to fork typeshed on GitHub and enable Travis CI on your fork. |
Thank you for the help. The unit tests ran successfully on my branch in my fork, so I put up the PR. |
Thanks for dealing with the tests! Yeah, stubtest will pick up platform differences, in which case the whitelisted errors checked in don't match up. I'll find ways to improve this + I can document this better. |
Document that the test will likely fail locally, to help cases like python#3782
Document that the test will likely fail locally, to help cases like #3782
The Timer signature specifies that
function
should have the signatureCallable[..., None]
. I couldn't find anything in the official Timer documentation on why that would be. In my project I found myself using a function with return value (that I'm not interested in), and don't see why this should not be accepted usage. I think probably the correct signature should beCallable[..., Any]
. Could someone clarify?The text was updated successfully, but these errors were encountered: