Passed
Pull Request — main (#389)
by
unknown
03:42 queued 01:48
created

ComponentHandler.register_id()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 3
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
from typing import Dict
5
6
7
from ._component import _Component
8
from ...utils.types import Singleton
9
from ...objects.app.command import InteractableStructure
10
11
12
class ComponentHandler(metaclass=Singleton):
13
    """Handles registered components
14
15
    Attributes
16
    ----------
17
    register : Dict[:class:`str`, :class:`Callable`]
18
        Dictionary of registered buttons.
19
    """
20
21
    register: Dict[str, InteractableStructure[_Component]] = {}
22