Commit graph

49 commits

Author SHA1 Message Date
Tim Rid
0a51f86183 slightly modified test_core.py so that mypy doesn't generate errors. 2021-01-01 22:56:53 +01:00
Tim Rid
fb38301189 fixed stub for NamedTuple 2021-01-01 22:55:48 +01:00
Tim Rid
0f597f643f added original tests from https://raw.githubusercontent.com/construct/construct/2626b398a676191114f6ce5d8db903e9590700db/tests/test_core.py 2021-01-01 22:06:19 +01:00
Tim Rid
944cf85797 - added tests "test_tstruct_default_field" and "test_tstruct_const_field"
- added setattrs
2021-01-01 17:26:40 +01:00
Tim Rid
4aa3013a82 corrected and enhanced tests 2021-01-01 15:42:10 +01:00
Tim Rid
8c8154aaa0 satisfy mypy 2021-01-01 15:41:36 +01:00
Tim Rid
11a2e02210 enforce correct types 2021-01-01 15:40:46 +01:00
Tim Rid
865d73a292 - renamed StructField to TStructField
- renamed UnionField to TUnionField
2021-01-01 13:58:55 +01:00
Tim Rid
ede0840a0b Fixed TStruct in TArray 2021-01-01 13:55:19 +01:00
Tim Rid
e6f3f12d30 - divided construct_typed in multiple files
- adapted the "test_typed.py" to dataclasses
2020-12-31 17:11:21 +01:00
Tim Rid
aff5c0589b rework of construct_typed to dataclasses 2020-12-31 00:31:44 +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
12d94f89e4 fixed swapped param of TypedStruct, to keep the order of the sucons in a container when printing
added TypedBitStruct
2020-12-16 21:39:45 +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
35c711ed33 further extended README.md 2020-12-13 16:10:20 +01:00
Tim Rid
2731cb45f2 further extended README.md 2020-12-13 16:01:24 +01:00
Tim Rid
0f84b85c8f extended README.md 2020-12-13 15:59:12 +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
timrid
5397c3d017
Initial commit 2020-12-04 17:16:20 +01:00