Commit graph

45 commits

Author SHA1 Message Date
Tim Rid
ae440407e9 - renamed "TStructField" to "field" and "TUnionField" to "ufield". This makes the dataclass definitions shorter and more readable.
- removed "Opt" and "List" because they are not necessary any more, because covariant is now included for ParsedType.
- added test with typing.List as field
- fix: changed dict to typing.Dict
2021-03-16 18:51:04 +01:00
Tim Rid
d0a31458a8 added covariant and contravariant from PR #1 2021-03-13 17:49:03 +01:00
Tim Rid
667ee5c7d3 changed "typing.ByteString" to "bytes" in the annotations, because it is equivalent according to the documentation of "typing.ByteString". 2021-03-13 13:00:43 +01:00
Tim Rid
318c5b0a67 arrow is now also typed, so the type ignore is unnecessary 2021-03-13 12:51:09 +01:00
Tim Rid
8957eaeede updated stubs for construct==2.10.61 2021-02-20 23:52:06 +01:00
Tim Rid
6900b37acd fixed things that are complained by pyright 2021-01-10 13:31:56 +01:00
Tim Rid
703d5a8638 added missing attributes of the constructs 2021-01-04 21:26:23 +01:00
Tim Rid
4c4bf74fd3 fixed some python 3.7 and numpy issues 2021-01-03 12:32:41 +01:00
Tim Rid
f5a3565f3e added stubs for LazyStruct, LazyListContainer, LazyArray, LazyBound
fixed bug in test_typed.py
2021-01-02 23:35:45 +01:00
Tim Rid
74a5082c7f run black and isort 2021-01-01 23:46:43 +01:00
Tim Rid
fb38301189 fixed stub for NamedTuple 2021-01-01 22:55:48 +01:00
Tim Rid
ede0840a0b Fixed TStruct in TArray 2021-01-01 13:55:19 +01:00
Tim Rid
ecb403b50b added value to Const and Default 2020-12-31 00:31:15 +01:00
Tim Rid
f024524b66 - replaces BufferType with typing.ByteString
- fixed stubs of Const
- changed __init__ to __new__ on ExprAdapter, ExprSymmetricAdapter, ExprValidator
2020-12-30 23:10:41 +01:00
Tim Rid
c0b0c7a3ab - added stubs for Tunnel, Compressed, Rebuffered
- added __getattr__ for Struct, Sequence, FocusedSeq, Union
2020-12-29 20:59:53 +01:00
Tim Rid
3e388ef1a6 added stubs for ProcessXor, ProcessRotateLeft, Checksum 2020-12-29 20:14:32 +01:00
Tim Rid
e357050dbe changed __init__ to __new__ of FlagsEnum 2020-12-29 19:11:03 +01:00
Tim Rid
5b6c312ba4 added stubs for OneOf, NoneOf, Filter, Slicing, Indexing 2020-12-29 17:43:32 +01:00
Tim Rid
06f37c3e1d - added missing variables to "Construct" class
- fixed __rtruediv__ of "Construct" class
2020-12-29 14:37:21 +01:00
Tim Rid
1b077ed18f - added stubs for stream access
- removed Optional from the "Context" class, and added comments instead
- added stub for Lazy
2020-12-29 14:13:24 +01:00
Tim Rid
a4b16ed338 changed __init__ to __new__ in Array, GreedyRange, NamedTuple
fixed stub for Switch
2020-12-29 13:10:25 +01:00
Tim Rid
fcef037323 added missing operator overloads 2020-12-29 13:00:24 +01:00
Tim Rid
0d7879efa5 - changed __init__ to __new__ many times
- fixed Computed, Hex and HexDump, Switch
2020-12-20 19:59:46 +01:00
Tim Rid
4619862610 auto formatted code 2020-12-20 17:25:45 +01:00
Tim Rid
ef949eca9c Fixed stub for Computed 2020-12-20 17:23:31 +01:00
Tim Rid
54a1cfab1a added stubs for Prefixed, PrefixedArray, FixedSized, NullTerminated, NullStripped, RestreamData
corrected stubs for RawCopy, Transformed
2020-12-18 21:57:15 +01:00
Tim Rid
379e2010c2 added stub for Mapping
enhances stubs for Struct, Sequence
2020-12-17 19:56:10 +01:00
Tim Rid
f472732cd6 enhanced stubs for expr.py and added an generator script 2020-12-17 19:55:07 +01:00
Tim Rid
907b812d72 added stubs for Pointer, Peek, Seek 2020-12-15 22:50:49 +01:00
Tim Rid
8211bb388d added stubs for Timestamp, HexDump, Union 2020-12-15 22:27:01 +01:00
Tim Rid
bb5adc0918 Added stubs for Pickled, Numpy, NamedTuple 2020-12-15 18:37:55 +01:00
Tim Rid
30aab9491e fixed stubs for RawCopy 2020-12-15 17:06:41 +01:00
Tim Rid
60f4001739 modified stubs for Adapter and all childs of adatper. removed AdaptedParsedType & AdaptedBuildTypes and changed the order.
corrected stubs for Rebuild and Default
corrected stubs for Hex
corrected stubs for Select. Removed class _Select
corrected stubs for Switch. Removed class _Switch
2020-12-15 15:57:53 +01:00
Tim Rid
dd11e7a355 fixed stubs for Const 2020-12-15 15:07:49 +01:00
Tim Rid
b860456b7a corrected Subconstruct to a class, so that _Subconstruct isn't nessesary any more.
added stubs for RawCopy
fixed stubs for Default, Rebuild, Computed, BitStruct
2020-12-15 14:37:43 +01:00
Tim Rid
9a336daea7 added stubs for Transformed, Restreamed, ByteSwapped, BitSwapped, Bitwise, Bytewise
added stubs for binary.pyi
2020-12-13 16:44:25 +01:00
Tim Rid
1874061446 Removed some alternative Solutions for Struct.
added stubs for Renamed
2020-12-13 14:29:30 +01:00
Tim Rid
e477f9fd7a refactored Subconstruct 2020-12-12 14:52:26 +01:00
Tim Rid
e920b2fc08 added stubs for StopIf 2020-12-12 14:08:57 +01:00
Tim Rid
fa2daec804 Added stubs for Switch 2020-12-12 13:44:28 +01:00
Tim Rid
8922c5eccc put a prefix before every object of "typing", because there are a few duplications, e.g. Union and Optional.
added stubs for Select, Optional, If, IfThenElse
2020-12-12 13:17:27 +01:00
Tim Rid
a564ff55fd a TypedStruct is always parsed to an object of the container_type 2020-12-12 12:12:54 +01:00
Tim Rid
29f6af7936 added stubs for py3compat.py
added stubs for debug.py
core: fixed Enum + EnumFlag, renamed ContextCallable to ContextLambda
2020-12-10 21:57:31 +01:00
Tim Rid
209314db4a added README.md
added more (mostly empty) stub files
added setup.py
added construct_typed initial version
added initial tests
2020-12-10 20:26:37 +01:00
Tim Rid
1e56433469 Initial Version 2020-12-09 21:26:16 +01:00