Skip to content

Commit b763a8a

Browse files
add missing docs
1 parent 976a0f1 commit b763a8a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

godice/dice.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ async def pulse_led(self, pulse_count, on_time_ms, off_time_ms, rgb_tuple):
9797
async def get_color(self):
9898
"""
9999
Read dice color
100+
:returns: Color
100101
"""
101102
self._color = self._color or await self._fetch_color()
102103
return self._color
@@ -111,6 +112,7 @@ async def _fetch_color(self):
111112
async def get_battery_level(self):
112113
"""
113114
Read a battery level
115+
:returns: int 0-100%
114116
"""
115117
cmd_code = 3
116118
msg = bytearray([cmd_code])

godice/factory.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class DiceShell(enum.Enum):
3434
def create(ble_client: bleak.BleakClient, dice_shell: DiceShell):
3535
"""
3636
Creates Dice API object representing the specified type of a dice
37+
:param ble_client: BleakClient
38+
:param dice_shell: DiceShell
3739
"""
3840
_dice = dice.Dice(ble_client)
3941
set_shell(_dice, dice_shell)
@@ -44,6 +46,8 @@ def set_shell(_dice: dice.Dice, dice_shell: DiceShell):
4446
"""
4547
Change a dice shell.
4648
Should be called in order to receive correct number notifications corresponding to a newly set shell
49+
:param dice: a Dice object to change a shell for
50+
:param dice_shell: DiceShell
4751
"""
4852
_xyzinterpret_fn = xyz_interpret_map[dice_shell]
4953
_dice._xyz_interpret_fn = _xyzinterpret_fn

0 commit comments

Comments
 (0)