Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix loader type annotations for mypy>=0.750 #313

Closed
@c24t

Description

@c24t

We started seeing mypy test failures in loader.py after the upgrade to 0.750 in #258.

% mypy --namespace-packages opentelemetry-api/src/opentelemetry/util/loader.py
opentelemetry-api/src/opentelemetry/util/loader.py:181: error: Incompatible types in assignment (expression has type "Callable[[Type[_T]], Optional[object]]", variable has type "Optional[Callable[[Type[object]], Optional[object]]]")
Found 1 error in 1 file (checked 1 source file)

I pinned the mypy version in 792449e as a temporary fix, but we need to update the annotations to work with latest.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions