Skip to content

Modules don't really conform to protocols #641

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

Open
KotlinIsland opened this issue Feb 11, 2024 · 0 comments
Open

Modules don't really conform to protocols #641

KotlinIsland opened this issue Feb 11, 2024 · 0 comments

Comments

@KotlinIsland
Copy link
Owner

KotlinIsland commented Feb 11, 2024

test.py

from typing import Protocol

import test2

class P(Protocol):
    def foo(self) -> None: ...

a: P = test2
reveal_type(type(a).foo)  # Revealed type is "def (self: test.P) -> None"

test2.py

def foo() -> None: ...

upstream: python/mypy#16890

@KotlinIsland KotlinIsland changed the title Modules don't really conform to protocols Modules don't really conform to protocols Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant