-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtemplate.py
More file actions
35 lines (23 loc) · 802 Bytes
/
template.py
File metadata and controls
35 lines (23 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys
from typing import Self
from PIL import Image
sys.dont_write_bytecode = True
from ..base import Manager
from ..vm import VManager
class ManagerMixin:
def __init__(self) -> None:
raise
class RawManager(Manager, ManagerMixin):
def __init__(self, version: str) -> None:
super().__init__(version)
def __call__(self) -> None:
raise NotImplementedError
def __enter__(self) -> Self:
return super().__enter__()
def __exit__(self, exc_type, exc_value, traceback) -> None:
super().__exit__(exc_type, exc_value, traceback)
def screenshot(self) -> Image.Image:
raise NotImplementedError
class VMManager(VManager, ManagerMixin):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)