# Coverage for client/parts/matching.py : 100%

## 12 statements 12 run 0 missing 2 excluded 0 partial

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 -*-

2 from __future__ import annotations

3

4# -- stdlib --

5 from typing import TYPE_CHECKING, Sequence

6

7# -- third party --

8# -- own --

9 import wire

10

11# -- typing --

12 if TYPE_CHECKING:

13 from client.core import Core # noqa: F401

14

15

16# -- code --

17 class Matching(object):

18 def __init__(self, core: Core):

19 self.core = core

20

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)))

25

26 def stop(self) -> None:

27 core = self.core

28 core.server.write(wire.msg.StartMatching(modes=[]))