j5.boards.board_group module

Board Group class.

class j5.boards.board_group.BoardGroup(backend_class: Type[U])[source]

Bases: typing.Generic

A group of boards that can be accessed.

backend_class

The Backend that this group uses for Boards.

boards

Get an unordered list of boards in this group.

classmethod get_board_group(_: Type[T], backend: Type[U]) → j5.boards.board_group.BoardGroup[~T, ~U][T, U][source]

Get the board group with the given types.

Whilst the first parameter value is not actually used in the function, we need it for typing purposes. This is similar to how a ProxyType works in Haskell.

make_safe() → None[source]

Make all of the boards safe.

singular() → T[source]

If there is only a single board in the group, return that board.

update_boards() → None[source]

Update the boards in this group to see if new boards have been added.