-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.py
66 lines (66 loc) · 1.73 KB
/
plugin.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# """
# This module will attempt to figure what what will be needed to build an
# extension.
#
# """
#
# from typing import Generic, List, Tuple, TypeVar
#
# from app.views.base import BaseView
# from client import BaseTyperizable
#
# T_ContentUser = TypeVar("T_ContentUser")
# T_ContentDocument = TypeVar("T_ContentDocument")
# T_ContentCollection = TypeVar("T_ContentCollection")
#
#
# # NOTE: T_Content will have to parametrize schemas.
# class Plugin(Generic[T_ContentUser, T_ContentDocument, T_ContentCollection]):
#
# views: List[BaseView]
# commands: List[BaseTyperizable]
#
# TypeContentUser: T_ContentUser | None
# TypeContentCollection: T_ContentCollection | None
# TypeContentDocument: T_ContentDocument
#
# def __init__(
# self,
# views: List[BaseView] | BaseView,
# commands: List[BaseTyperizable] | BaseTyperizable,
# TypeContentUser: T_ContentUser,
# TypeContentDocument: T_ContentDocument,
# TypeContentCollection: T_ContentCollection,
# ):
# if not isinstance(views, list):
# views = [views]
#
# if not isinstance(commands, list):
# commands = [commands]
#
# self.views, self.commands = views, commands
# self.TypeContentUser = TypeContentUser
# self.TypeContentDocument = TypeContentDocument
# self.TypeContentCollection = TypeContentCollection
#
# @property
# def app(
# self,
# ) -> BaseView[
# T_ContentUser,
# T_ContentDocument,
# T_ContentCollection,
# ]: ...
#
# @property
# def client(
# self,
# ) -> BaseTyperizable[
# T_ContentUser,
# T_ContentDocument,
# T_ContentCollection,
# ]: ...
#
#
# # ----
# ...