Coverage for client/parts/matching.py : 100%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
2from __future__ import annotations
4# -- stdlib --
5from typing import TYPE_CHECKING, Sequence
7# -- third party --
8# -- own --
9import wire
11# -- typing --
12if TYPE_CHECKING:
13 from client.core import Core # noqa: F401
16# -- code --
17class Matching(object):
18 def __init__(self, core: Core):
19 self.core = core
21 # ----- Public Methods -----
22 def start(self, modes: Sequence[str]) -> None:
23 core = self.core
24 core.server.write(wire.msg.StartMatching(modes=list(modes)))
26 def stop(self) -> None:
27 core = self.core
28 core.server.write(wire.msg.StartMatching(modes=[]))