Repository navigation
Fix "not exported from module" error in Pyright - #51
Merged
rikhilrai merged 3 commits intoOct 18, 2022
Merged
Conversation
Without this, Pyright reports this error: "CaseInsensitiveDict" is not exported from module "case_insensitive_dict" Import from "case_insensitive_dict.case_insensitive_dict" instead Upstream pyright seems to have confirmed the behavior is intended and libraries need to be explicit about which symbols are considered public. (See the linked docs in microsoft/pyright#2277)
rikhilrai
approved these changes
Oct 18, 2022
Codecov Report
@@ Coverage Diff @@
## main #51 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 59 59
Branches 7 7
=========================================
Hits 59 59 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
rikhilrai
reviewed
Oct 18, 2022
Contributor
|
Thanks for your contribution! LGTM |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this change, Pyright reports this error:
Upstream Pyright seems to have confirmed the behavior is intended and libraries need to be explicit about which symbols are considered public. (See the linked docs in microsoft/pyright#2277)
The other alternative seems to be modifying the imports in
__init__.pyto have aliases, like this:but that requires adding:
Let me know if you think there's a better way to address this.
Thanks!