Commit graph

131 commits

Author SHA1 Message Date
Tim Rid
d660d690fe pyright is now also supported 2021-05-23 16:41:28 +02:00
Tim Rid
2b5967e11d fixing pyright issues 2021-05-23 16:22:40 +02:00
Tim Rid
22a0ed7f24 - updated documentation
- removed tunion completely
2021-05-23 15:28:27 +02:00
Tim Rid
5a39c51321 - renamed classes/methods/file:
- "tstruct.py" -> "dataclass_struct.py"
    - "TStruct" -> "DataclassStruct"
    - "TBitStruct" -> "DataclassBitStruct"
    - "sfield" -> "csfield"
    - "TContainerMixin" -> "DataclassMixin"

- extended documentation
2021-05-22 23:36:54 +02:00
Tim Rid
9666d132fd added TBitStruct test 2021-05-22 21:51:24 +02:00
Tim Rid
a11132e67d fixed mypy error 2021-05-22 17:45:45 +02:00
Tim Rid
48d50736b0 fixed error 2021-05-22 17:33:34 +02:00
Tim Rid
c9d6f58fd4 fixed mypy errors 2021-05-22 17:32:23 +02:00
Tim Rid
3811437219 fixed faild test 2021-05-22 17:22:04 +02:00
Tim Rid
a304977aca - Revised TContainerMixin:
- removed inheritance of cs.Container (which removed the acces to dataclass objects via square brackets)
   - copied __str__ from cs.Container with a few modifications

- Removed 'add_offsets' from TStruct
- Changed implementation of TBitStruct
2021-05-22 17:10:56 +02:00
Tim Rid
1f76b62580 added missing methods to stub file 2021-05-22 13:12:48 +02:00
Tim Rid
b43a4840ac Fixed "encmapping" of "Enum". Every string can be used as key 2021-04-29 15:50:49 +02:00
Tim Rid
64731e4050 incremented version to 0.4.2 2021-04-13 21:35:32 +02:00
Tim Rid
976e68d4b9 values from "cs.Const" and "cs.Default" are now set as default value from the dataclass 2021-04-13 21:33:11 +02:00
Tim Rid
d092e48a68 fixed failing test case 2021-04-03 21:40:26 +02:00
Tim Rid
c7b0a9627c incremented version to v0.4.1 2021-04-03 21:37:19 +02:00
Tim Rid
845af16b4a Updated to construct==2.10.66 2021-04-03 21:35:57 +02:00
Tim Rid
840817abaa fixed README.md 2021-03-30 19:59:46 +02:00
Tim Rid
b72c2671dc incremented version to v0.4.0 2021-03-30 19:58:04 +02:00
Tim Rid
94b7f7f606 changed "swapped" to "reverse" in TStruct and TBitStruct 2021-03-30 19:54:23 +02:00
Tim Rid
b336087493 renamed "TContainerBase" to "TContainerMixin" 2021-03-30 19:35:33 +02:00
Tim Rid
7f88357562 changed "construct" dependency to 2.10.64 and adapt to the changes 2021-03-30 19:20:57 +02:00
Tim Rid
2b67e07d79 some bugfixes 2021-03-30 19:11:44 +02:00
Tim Rid
c03af674be added version file and incremented version to 0.3.0 2021-03-24 20:28:39 +01:00
Tim Rid
f64f1cac6c fixed __new__ 2021-03-24 20:19:15 +01:00
Tim Rid
5c6f5020f9 fixed typing error from pylance in the constructor of TEnum and TFlagsEnum 2021-03-24 20:15:23 +01:00
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
084c39a1ff removed unused type ignore 2021-03-13 17:54:06 +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
fd590cf019 incremented version to v0.2.0 2021-02-21 00:23:36 +01:00
Tim Rid
94185cf1de added link to pypi 2021-02-21 00:17:51 +01:00
Tim Rid
05fa2acafb fixed requirements.txt 2021-02-21 00:17:20 +01:00
Tim Rid
b6016554cc adapted the "TContainerBase" to the "TContainer" of construct v2.10.61 based on an OrderedDict 2021-02-21 00:13:45 +01:00
Tim Rid
8957eaeede updated stubs for construct==2.10.61 2021-02-20 23:52:06 +01:00
Tim Rid
246a7d3910 added two offsets for each element 2021-02-20 22:11:10 +01:00
Tim Rid
57d843171e added __getattr__ to TStruct 2021-02-20 21:50:50 +01:00
Tim Rid
a4741e2bf2 new setting in TStruct: "add_offsets" 2021-02-20 21:42:39 +01:00
Tim Rid
e902748656 removed unused 'type: ignore' 2021-01-24 17:59:37 +01:00
Tim Rid
8be150b090 adding also values that are not part of the dataclass to the "TContainer" while parsing 2021-01-24 17:49:39 +01:00
Tim Rid
419353c712 strip trailing new lines in documentation 2021-01-10 13:33:02 +01:00
Tim Rid
6900b37acd fixed things that are complained by pyright 2021-01-10 13:31:56 +01:00
Tim Rid
5f8a6b310d Incremented version to v0.1.1 2021-01-04 21:28:37 +01:00
Tim Rid
cbcae90e58 Merge branch 'main' of https://github.com/timrid/construct-typing into main 2021-01-04 21:26:36 +01:00
Tim Rid
703d5a8638 added missing attributes of the constructs 2021-01-04 21:26:23 +01:00
timrid
2a562c94cd
Create python-publish.yml 2021-01-03 14:05:23 +01:00
Tim Rid
c0bd93d680 removed unnessesary file 2021-01-03 13:34:47 +01:00
Tim Rid
127e95fec5 Merge branch 'timrid-patch-1' of https://github.com/timrid/construct-typing into timrid-patch-1 2021-01-03 12:56:04 +01:00
Tim Rid
53ab48a1ea incremented version to 0.1.0 2021-01-03 12:55:45 +01:00