Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """ |
||
2 | * PyDMXControl: A Python 3 module to control DMX using OpenDMX or uDMX. |
||
3 | * Featuring fixture profiles, built-in effects and a web control panel. |
||
4 | * <https://github.com/MattIPv4/PyDMXControl/> |
||
5 | * Copyright (C) 2018 Matt Cowley (MattIPv4) ([email protected]) |
||
6 | """ |
||
7 | |||
8 | from ..defaults import Fixture |
||
9 | |||
10 | |||
11 | class Custom(Fixture): |
||
12 | |||
13 | def __init__(self, *args, **kwargs): |
||
14 | if "channels" not in kwargs: |
||
15 | raise TypeError("__init__() missing 1 required keyword-only argument: 'channels'") |
||
16 | |||
17 | super().__init__(*args, **kwargs) |
||
18 | |||
19 | for _ in range(kwargs["channels"]): |
||
20 | self._register_channel(str(_ + 1)) |
||
21 |