Skip to content
Commit 74f95688 authored by Martí Bolívar's avatar Martí Bolívar Committed by Carles Cufi
Browse files

dtlib: add Type enum



Instead of hard-coding constants, use an IntEnum.

These is still a subclass of 'int', but is both easier to import and
easier to read during debugging.

For example, compare:

>>> Type.BYTES
<Type.BYTES: 1>

with:

>>> TYPE_BYTES
1

However, 'Type.BYTES == 1' is still True, and the enum values
otherwise behave like you would expect.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent 9a85a893
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment