Commit graph

84 commits

Author SHA1 Message Date
Olivier Morelle
c5ffc142be fix(core.pyi): replaces typing.TypeAlias by typing_extensions.TypeAlias for compatibility with python3.9 2025-10-26 20:40:54 +01:00
Tim Rid
04e1bc0c61 updated to construct==2.10.70 2025-01-12 15:35:54 +01:00
timrid
ef933cc06d
Merge pull request #30 from adamrimon/feature/inner_construct_methods
Internal Construct methods
2025-01-12 13:39:49 +01:00
Tim Rid
a2a6be536f satisfy pyright 1.1.391 2025-01-12 12:33:51 +01:00
Tim Rid
457857389a According to PEP688 (https://peps.python.org/pep-0688/#removal-of-the-bytes-special-case) bytes has not any special meaning any more. So bytearray is not included in bytes any more and we have to declare it explicitly. collections.abc.Buffer cant be used, because memoryview is not supported by construct 2025-01-12 12:22:45 +01:00
Prilkop
9957b0e6f1
added internal Construct methods, used when inheriting the class 2024-06-17 15:46:04 +03:00
Tim Riddermann
c04a90575d use PEP688 buffer protocol for "parse" Method (fixes #24) 2023-07-24 10:57:50 +02:00
Tim Riddermann
c6bded59f4 fixes #25 2023-07-24 10:56:37 +02:00
Tim Riddermann
86fddbe2ac simplified "IfThenElse" 2023-07-24 10:36:28 +02:00
Tim Riddermann
26f7fd82dc removed unnessesary comment 2023-07-24 10:14:33 +02:00
Tim Riddermann
86f27dc1fb use method-scoped TypeVars for __new__ (see here https://github.com/microsoft/pyright/issues/5404#issuecomment-1645764913) 2023-07-24 09:40:50 +02:00
Tim Riddermann
3c81d99c12 Added __new__ only where it is an absolute must have. 2023-07-18 17:36:27 +02:00
Tim Riddermann
f75029247f added missing definitions 2023-07-18 17:26:03 +02:00
Tim Riddermann
dd1691528f fixed pyright errors 2023-07-18 15:46:17 +02:00
Tim Riddermann
1e7ced992d removed all self type annotations of __init__ methods 2023-07-18 15:38:01 +02:00
Tim Riddermann
dcdeeca39f removed all __new__ methods. mypy v1.4.1 is working. 2023-06-30 14:13:01 +02:00
Tim Riddermann
6550e59dd3 added missing __new__ methods 2023-06-30 13:06:29 +02:00
Tim Riddermann
2200a0a8d0 fixed mypy errors 2023-05-09 12:31:38 +02:00
Tim Riddermann
bb3935e7eb fixes #19 2023-05-09 12:27:46 +02:00
Tim Riddermann
238ca5d2df removed not working __init__ 2023-01-06 12:05:14 +01:00
Tim Riddermann
7f6577af47 added __init__ methods for all that currently only defined an __new__ method 2023-01-06 12:00:42 +01:00
Tim Riddermann
f98532a382 fixed _subconsindexes 2023-01-06 10:35:07 +01:00
Tim Riddermann
31a10dcc88 added type hints for Struct._subcons, Sequence._subcons, FocusedSeq._subcons, Union._subcons, LazyStruct._subcons, LazyStruct._subconsindexes 2023-01-06 10:32:19 +01:00
Tim Rid
349c8e5dd2 Updated IfThenElse so that it represents the real implementation 2022-12-23 20:37:05 +01:00
Tim Rid
e10938f308 Added type hint to self type, for mypy support. 2022-10-24 00:07:57 +02:00
Tim Rid
2b780ae7b9 changed Adapter __new__ to __init__ to fix #13. But this change on Adapter also reqires to change other Adapter subclasses. 2022-10-23 23:49:58 +02:00
Tim Rid
a03190d816 fixed some pyright/pylance issues 2022-10-23 22:48:42 +02:00
Tim Rid
29d2608c37 fixed BuildTypes of cs.Const 2022-02-13 01:06:45 +01:00
Parnassius
0979257dd7 Use os.PathLike for file names 2022-01-07 12:27:46 +01:00
Tim Rid
a71b040847 fixed IfThenElse for pyright 2021-10-23 12:54:43 +02:00
Tim Rid
0e9fb3a497 added stub for evaluate 2021-07-31 13:59:48 +02:00
Tim Rid
e377951b8f fixed Switch.default 2021-07-31 13:59:32 +02:00
Tim Rid
334e13c630 enhance cs.Checksum see #3 2021-07-19 20:41:41 +02:00
Tim Rid
2b5967e11d fixing pyright issues 2021-05-23 16:22:40 +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
845af16b4a Updated to construct==2.10.66 2021-04-03 21:35:57 +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
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