Mercurial > code > home > repos > light-bridge
comparison light.py @ 4:e8e4fd6d5619
refactor
author | drewp@bigasterisk.com |
---|---|
date | Sun, 28 Jan 2024 16:01:00 -0800 |
parents | c6fd04e07db0 |
children | 7eeda7f4f9cd |
comparison
equal
deleted
inserted
replaced
3:c04563fc8616 | 4:e8e4fd6d5619 |
---|---|
2 import asyncio | 2 import asyncio |
3 import logging | 3 import logging |
4 from dataclasses import dataclass | 4 from dataclasses import dataclass |
5 | 5 |
6 log = logging.getLogger('light') | 6 log = logging.getLogger('light') |
7 | |
8 class Color(str): | |
9 | |
10 def to_js(self): | |
11 return self | |
12 | 7 |
13 | 8 |
14 @dataclass | 9 @dataclass |
15 class Light: | 10 class Light: |
16 name: str | 11 name: str |