Skip to content

The return type of _get_mutex_context_from_loglevel_timeout is annotated as Any to maintain support for Python 3.7 and 3.8. #61

Open
@hoophalab

Description

@hoophalab

Request

The return type of function _get_mutex_context_from_loglevel_timeout should be AbstractContextManager[Optional[bool]], but it is annotated as Any to satisfy the linter in Python 3.7 and 3.8, as generic AbstractContextManager was introduced in Python 3.9 #18239.

Possible implementation

Once we drop support for Python 3.7 and 3.8, we can change the return type back to AbstractContextManager[Optional[bool]].

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions