opentelemetry-python
opentelemetry-python copied to clipboard
Object of type "None" is not subscriptable
Describe your environment
sdk 1.32.1
What happened?
errors in vscode/pyright with
Object of type "None" is not subscriptablePylance[reportOptionalSubscript](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportOptionalSubscript)
Steps to Reproduce
print(span.attributes["name"])
Expected Result
No type error because span.attributes can never be None.
Actual Result
Object of type "None" is not subscriptablePylance[reportOptionalSubscript](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportOptionalSubscript)
Additional context
No response
Would you like to implement a fix?
None