zephyr/scripts/dts/python-devicetree
Martí Bolívar c875cb0f94 dtlib: fix Property.type type annotation
Holy overloaded technical terms, Batman.

Here, 'property' and 'type' each mean two different things, which
we can distinguish like this:

- Property (capital P): dtlib.Property class, represents
  a property in a devicetree node
- @property: a Python property
- type(): an "@property" in the Property class, that returns
  a dtlib.Type value
- Type (capital T): dtlib.Type class, represents the devicetree
  type of a Property value (dtlib.Type.BYTES, etc.)

The type() @property in the Property class currently has an 'int' as
its Python return type annotation. It really returns a dtlib.Type,
which is an int (since it's an IntEnum), but that's not the same thing
as an int.

Change this to Type to be clear that not just any int can be returned
by this @property.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-11-07 19:00:31 +01:00
..
src/devicetree dtlib: fix Property.type type annotation 2022-11-07 19:00:31 +01:00
tests dtlib: error out on duplicate node names 2022-09-21 07:55:40 -07:00
.gitignore
requirements.txt
setup.py
tox.ini python-devicetree: CI hotfix 2022-06-06 09:09:27 -07:00