Releases: timrid/construct-typing
Releases · timrid/construct-typing
v0.6.2
v0.6.1
v0.6.0
- 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. forFormatField
,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
andbuild_file
do not return anything (fixes #25).
v0.5.6
v0.5.5
- 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__
forEnumBase
to create enum member objects (fixes #18)
v0.5.4
- fixed static analysis issues so that the latest versions are supported
- pyright: 1.1.285
- mypy: 0.991
- updated
IfThenElse
so that it represents the real implementation as a class and not a method - enhanced
EnumBase
andFlagsEnumBase
to support individual documentation for each enum value viaEnumValue
v0.5.3
v0.5.2
v0.5.1
v0.5.0
Big changes:
- renamed classes/methods/files:
tstruct.py
->dataclass_struct.py
TStruct
->DataclassStruct
TBitStruct
->DataclassBitStruct
sfield
->csfield
TContainerMixin
->DataclassMixin
- Removed
add_offsets
fromDataclassStruct
- Revised
DataclassMixin
:- removed inheritance of
cs.Container
, which removed the inherited methods names likeupdate
,keys
, etc and makes them usable as dataclass field names - copied
__str__
fromcs.Container
with a few modifications, so that the output stays almost the same
- removed inheritance of
Small changes:
- adapted stubs to construct v2.10.67
- fixed some errors in construct-stubs and added a few missing methods
- pyright is now fully supported
- extended documentation
- removed unfinished union file