You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reworked construct-stubs so that it supports pyright>=v1.1.310. To support pyright and mypy in the past, __new__ and __init__ had to be defined. However, this is no longer supported by pyright. Now in most cases only __init__ is defined. Only for some special cases __new__ is used (e.g. for FormatField, Const, Hex, HexDump, IfThenElse, Switch)
Added stubs for cs.Compiled.
Added some more missing definitions (__author__, __version__, possiblestringencodings, hexdump, hexundump, PY)
Use PEP688 buffer protocol for the parse method (fixes #24). This requires a dependency to typing_extensions>=4.6.0.
build_stream and build_file do not return anything (fixes #25).
added type hints for cs.Struct._subcons, cs.Sequence._subcons, cs.FocusedSeq._subcons, cs.Union._subcons, cs.LazyStruct._subcons, cs.LazyStruct._subconsindexes
added generic wrapper for cs.Array
added __init__ methods for all constructs that currently only define an __new__ method
using __new__ instead of __init__ for EnumBase to create enum member objects (fixes #18)