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
Labels
enhancement
New feature or request
Request
The return type of function _get_mutex_context_from_loglevel_timeout should be
AbstractContextManager[Optional[bool]]
, but it is annotated asAny
to satisfy the linter in Python 3.7 and 3.8, as genericAbstractContextManager
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]]
.The text was updated successfully, but these errors were encountered: