OpenCyphal / pydsdl

Cyphal DSDL processing front end implemented in Python
https://opencyphal.org
MIT License
11 stars 9 forks source link

Add a convenience property CompositeType.inner_type to reduce boilerplate #55

Closed pavel-kirienko closed 4 years ago

pavel-kirienko commented 4 years ago

Currently, inner_type is defined only for DelimitedType. This changeset makes it a CompositeType property that returns a reference to self unless self is DelimitedType.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 36067471


Totals Coverage Status
Change from base Build 36051510: 0.0%
Covered Lines: 3289
Relevant Lines: 3289

💛 - Coveralls
pavel-kirienko commented 4 years ago

I'm unclear how this has any effect. I'd expect to see some corresponding change to DelimitedType that overrode this method to return the decorated type instead of itself.

Ah, yes, DelimitedType already has this property in the upstream. It used to be a regular property, now it is polymorphic.