-
Notifications
You must be signed in to change notification settings - Fork 483
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
OpenTelemetry symbols marked private to pyright #2455
Comments
Hey @quom, thanks for bringing this to our attention. We don't check our code with pyright so we weren't aware of this. This needs a bit of looking into how to tell pyright those are not private imports. Based on my very brief investigation adding an |
Is this issue assigned ? |
@khuongduy354 No, it's up for grabs! |
I know this may be a beginner question, my project cant find Open Telemetry package, i followed this guide here: https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md, import sentry_sdk.integrations works, and i checked there's a init.py in opentelemtry folder (so it's a package). Don't know why it cant be found.
|
@khuongduy354 The error is a bit misleading, it's complaining about not being able to import |
Tried to repro too, also unsuccessfully. @quom could you help us out with more details on how you installed and ran pyright and what version you're using? I have |
I can see why it is creating the error as per the spec for typed libraries. Are you using the normal sentry_sdk package install or a local dev dependency of it? There may be different behaviour depending on how the package is installed in your environment. |
Maybe a local dev dependency. I followed setup here: https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md. Which is pip install in editable mode |
I'm not exactly sure why pyright might not be reproducing it on your side (can't see anything specific about local dependencies that may be different). Here is an example of a package's |
Does adding add to init.py in your telemetry fix the issue on your machine? |
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.32.0
Steps to Reproduce
Expected Result
Import without pyright errors
Actual Result
Errors as above.
By changing the imports to be more specific pyright would pass but this is not in the documentation:
The text was updated successfully, but these errors were encountered: