-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
self.__class__.__name__ has type Any in class derived from Any #4058
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
This will be fixed by #4038 |
Ah, thanks. I'm waiting for Jukka to review that, it's a bit above my review capacity ATM. |
I will add this example to the tests in the meantime. |
FWIW, the issue in our internal codebase that prompted this report is not resolved by #4038. But that issue is more complex than my example here, and I haven't boiled it down yet. To avoid referencing the other (closed, typeshed) issue, here is the problem again. Some file gives this error:
The source code at that line looks like this: from threading import local
...
class TrackedTask(local):
def __init__(self, ...):
# type: ...
if SupportedTrackedTaskWorkers.is_supported(self.__class__.__name__, self.task_name): ... |
Hm, strange, I can't reproduce this. I replaced |
Me neither. :-( There must be something else in the file that affects this, but I don't yet know what it is. There must be something really strange going on, since if I add
|
Regardless of the possible mypy bug, could we fix this in typeshed by making threading.local not inherit from Any and instead override |
Yes, that should be fine now.
|
Wow. Thanks!
…On Oct 11, 2017 05:17, "Jukka Lehtosalo" ***@***.***> wrote:
Closed #4058 <#4058> via #4038
<#4038>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4058 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACwrMtYu50OdM3D3IO12hx607bh9xsP1ks5srLHagaJpZM4PuO4e>
.
|
Here's something that came up in python/typeshed#1549 (comment).
@ilevkivskyi I think you muttered something about
analyze_member_access
forTypeType
still being broken but I'm not sure I understand.The text was updated successfully, but these errors were encountered: