Skip to content
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

Preserve (some) implicitly exported types #13967

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Oct 31, 2022

Fixes some of #13965, fixes #12749

We also need to modify attribute access logic (this is the TODO in the PR), which is a little trickier. But cases like #13933 convinced me it's worth making this change, even before I get around to figuring that out.

Fixes some of python#13965

We also need to modify attribute access logic (this is the TODO in the
PR), which is a little trickier. But cases like python#13933 convinced me it's
worth making this change, even before I get around to figuring that out.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

urllib3 (https://github.com/urllib3/urllib3)
+ test/test_connection.py:60: error: "CertificateError" has no attribute "_peer_cert"  [attr-defined]
+ test/test_connection.py:75: error: "CertificateError" has no attribute "_peer_cert"  [attr-defined]
+ test/test_connection.py:135: error: "CertificateError" has no attribute "_peer_cert"  [attr-defined]
+ test/test_connection.py:169: error: "CertificateError" has no attribute "_peer_cert"  [attr-defined]

streamlit (https://github.com/streamlit/streamlit)
+ lib/tests/streamlit/web/server/browser_websocket_handler_test.py: note: In member "test_backmsg_deserialization_exception" of class "BrowserWebSocketHandlerTest":
+ lib/tests/streamlit/web/server/browser_websocket_handler_test.py:75:58: error: Incompatible types in assignment (expression has type "SessionClient", variable has type "BrowserWebSocketHandler")  [assignment]

parso (https://github.com/davidhalter/parso)
- parso/python/tree.py:49: error: Name "Mapping" already defined (possibly by an import)  [no-redef]

@hauntsaninja
Copy link
Collaborator Author

mypy_primer looking good!

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the new behavior seems clearly better.

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.

no-implicit-reexport resolves implicit re-exports as Any
2 participants