mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
14 lines
301 B
Python
14 lines
301 B
Python
|
|
from typing import Optional, TypeVar, Type
|
||
|
|
|
||
|
|
T = TypeVar('T')
|
||
|
|
|
||
|
|
class Managed:
|
||
|
|
@classmethod
|
||
|
|
def current(cls: Type[T], value: Optional[T] = None, required: bool = True) -> T: ...
|
||
|
|
|
||
|
|
def __call__(self, func: T) -> T: ...
|
||
|
|
|
||
|
|
def __enter__(self: T) -> T: ...
|
||
|
|
|
||
|
|
class DefaultManaged(Managed): ...
|