-
Notifications
You must be signed in to change notification settings - Fork 309
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
Type checking errors with datadog client due to private imports #830
Comments
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
Issue is still active. |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
Probably should be closed in favor of #842, as it's been more active and now has a PR associated with it. |
Describe the bug
The documented way of accessing dogstatsd is
from datadog import statsd
. This is a re-export of another module, indatadog/__init__.py
:Unfortunately, the typechecker in VSCode (pyright) flags this as use of a private module:
The fix for this is to use a convention for re-exporting a module publically is:
I would put up a PR for this but I'm not sure which modules are intended as public interfaces from the top-level module.
To Reproduce
Steps to reproduce the behavior:
Create a project with this pyproject.toml:
And put this in main.py:
And run
poetry run pyright
:Expected behavior
No type errors in normal use.
The text was updated successfully, but these errors were encountered: