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

Fix: top-level imports not flagged as public for type checkers #23

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Fix: top-level imports not flagged as public for type checkers #23

merged 1 commit into from
Dec 29, 2023

Conversation

mikenerone
Copy link
Contributor

@mikenerone mikenerone commented Dec 28, 2023

Pyright and Mypy both emit errors when using greenback's top-level symbols because they aren't recognized as public. Example pyright error:
trio.py:

4: import greenback
...
22:         result = await greenback.with_portal_run_tree(async_fn, *args)
...

Error:

  .../trio.py:22:34 - error: "with_portal_run_tree" is not exported from module "greenback" (reportPrivateImportUsage)

This branch changes those top-level imports to the redundant from X import A as A form to flag that the symbols are public.

Copy link

codecov bot commented Dec 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2acb0b3) 99.74% compared to head (b51d10e) 99.74%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #23   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files           7        7           
  Lines         788      788           
  Branches      113      113           
=======================================
  Hits          786      786           
  Misses          1        1           
  Partials        1        1           
Flag Coverage Δ
cpython 98.98% <100.00%> (ø)
pypy36release 90.95% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oremanj
Copy link
Owner

oremanj commented Dec 29, 2023

RTD error is fixed on master. Black error is because the CI is picking up prerelease 24.1a1, probably not worth fixing right now. Thanks for the PR!

@oremanj oremanj merged commit 573c247 into oremanj:master Dec 29, 2023
31 of 33 checks passed
@mikenerone mikenerone deleted the mikenerone/fix-typecheck-private-symbol-errors branch December 29, 2023 02:37
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.

2 participants