AIT-Core
AIT-Core copied to clipboard
Add extension capability to table and dtype
Add the capability to extend Classes with table and dtype
Working on a patch for dtype extensions support. Will have a PR up shortly for review
It seems like extending CustomTypes requires python 3.10 or greater given the example code in the documentation. If so, this should be reflected in the install instructions.
class MyCustomTypes(dtype.CustomTypes):
def get(self, typename: str) -> Optional[dtype.PrimitiveType]:
match typename:
case 'My24BitMSB':
return My24BitMSB()
return None
Hey @cswoodruff, I'm guessing you're referencing the match
in the example? Or something else and I'm just overlooking it? There's no "requirement" there beyond overwriting the interface.
I was referring to the match
in the example. It just caught me off guard because my virtualenv was running with python3.8 and I tried the example listed in the documentation and it failed.
I was referring to the
match
in the example. It just caught me off guard because my virtualenv was running with python3.8 and I tried the example listed in the documentation and it failed.
Updated in 69ad7fe3abfd497e6ad989b10aa40f84137d093e