Skip to content

Conversation

@davidhalter
Copy link
Contributor

This latest update passes most conformance tests for Zuban. I simplified the flags for zuban check and it also passes 2 more tests for Pyrefly.

I have made several small changes to the tests. These should mostly be uncontroversial:

  • Made it possible to report unreachable after a function that returns Never.
  • Removed a redundant import that Zuban reported
  • A method can now be inferred as SelfTypeVar = TypeVar("SelfTypeVar", bound=Foo7[int]); Callable[[SelfTypevar], SelfTypeVar] instead of Callable[[Foo7[int]], Foo7[int]]. I personally believe this should be how we infer things, since it's more precise but I don't think we have to mandate this.
  • I allowed type checkers to return list[Any] instead of Any in an overload, if there was no match, because both of the overloads return a list and it is therefore just a slightly more precise type.
  • I added an additional optional error for taking a TypeVar of an outer generic class (in an __init__). There is already an error for the outer attribute x, but I feel like this error should be fine.

There remain 4 non-passing tests for Zuban, all of which I'm not sure the tests are doing the right thing. I will be discussing these in the typing discourse.

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

Successfully merging this pull request may close these issues.

1 participant