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

## 9 statements 9 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 Contest(object):

18 def __init__(self, core: Core):

19 self.core = core

20

21 # ----- Public Methods -----

22 def setup(self, name: str, mode: str, uids: Sequence[int]) -> None:

23 core = self.core

24 core.server.write(wire.msg.SetupContest(name=name, mode=mode, uids=list(uids)))