obstruct 0.2.5__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/workspace.xml +12 -9
  2. {obstruct-0.2.5 → obstruct-0.2.7}/PKG-INFO +1 -1
  3. obstruct-0.2.7/src/obstruct/__version__.py +1 -0
  4. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/methods.py +4 -0
  5. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/struct_type.py +1 -1
  6. obstruct-0.2.5/src/obstruct/__version__.py +0 -1
  7. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/.gitignore +0 -0
  8. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  9. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  10. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/misc.xml +0 -0
  11. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/modules.xml +0 -0
  12. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/obstruct.iml +0 -0
  13. {obstruct-0.2.5 → obstruct-0.2.7}/.idea/vcs.xml +0 -0
  14. {obstruct-0.2.5 → obstruct-0.2.7}/README.md +0 -0
  15. {obstruct-0.2.5 → obstruct-0.2.7}/pyproject.toml +0 -0
  16. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/__init__.py +0 -0
  17. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/aot/__init__.py +0 -0
  18. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/aot/aot.py +0 -0
  19. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/aot/base.py +0 -0
  20. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/aot/pack.py +0 -0
  21. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/aot/unpack.py +0 -0
  22. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/types/__init__.py +0 -0
  23. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/types/base.py +0 -0
  24. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/types/types.py +0 -0
  25. {obstruct-0.2.5 → obstruct-0.2.7}/src/obstruct/types/types.pyi +0 -0
  26. {obstruct-0.2.5 → obstruct-0.2.7}/test/test.py +0 -0
  27. {obstruct-0.2.5 → obstruct-0.2.7}/test/test_speed.py +0 -0
  28. {obstruct-0.2.5 → obstruct-0.2.7}/uv.lock +0 -0
@@ -4,15 +4,9 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="b482b6b4-48ce-4be1-bf3c-a72ec254fa35" name="更改" comment="增强 array 类型的支持">
8
- <change beforePath="$PROJECT_DIR$/src/obstruct/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/__init__.py" afterDir="false" />
7
+ <list default="true" id="b482b6b4-48ce-4be1-bf3c-a72ec254fa35" name="更改" comment="增强 array 类型的支持 x2">
9
8
  <change beforePath="$PROJECT_DIR$/src/obstruct/__version__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/__version__.py" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/src/obstruct/aot/base.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/aot/base.py" afterDir="false" />
11
- <change beforePath="$PROJECT_DIR$/src/obstruct/aot/pack.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/aot/pack.py" afterDir="false" />
12
- <change beforePath="$PROJECT_DIR$/src/obstruct/aot/unpack.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/aot/unpack.py" afterDir="false" />
13
- <change beforePath="$PROJECT_DIR$/src/obstruct/decorator.py" beforeDir="false" />
14
9
  <change beforePath="$PROJECT_DIR$/src/obstruct/struct_type.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/struct_type.py" afterDir="false" />
15
- <change beforePath="$PROJECT_DIR$/test/test_speed.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/test_speed.py" afterDir="false" />
16
10
  </list>
17
11
  <option name="SHOW_DIALOG" value="false" />
18
12
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -181,7 +175,15 @@
181
175
  <option name="project" value="LOCAL" />
182
176
  <updated>1786875274813</updated>
183
177
  </task>
184
- <option name="localTasksCounter" value="6" />
178
+ <task id="LOCAL-00006" summary="增强 array 类型的支持 x2">
179
+ <option name="closed" value="true" />
180
+ <created>1786883898686</created>
181
+ <option name="number" value="00006" />
182
+ <option name="presentableId" value="LOCAL-00006" />
183
+ <option name="project" value="LOCAL" />
184
+ <updated>1786883898686</updated>
185
+ </task>
186
+ <option name="localTasksCounter" value="7" />
185
187
  <servers />
186
188
  </component>
187
189
  <component name="TypeScriptGeneratedFilesManager">
@@ -204,6 +206,7 @@
204
206
  <MESSAGE value="补充:基准测试脚本" />
205
207
  <MESSAGE value="修正了一些命名" />
206
208
  <MESSAGE value="增强 array 类型的支持" />
207
- <option name="LAST_COMMIT_MESSAGE" value="增强 array 类型的支持" />
209
+ <MESSAGE value="增强 array 类型的支持 x2" />
210
+ <option name="LAST_COMMIT_MESSAGE" value="增强 array 类型的支持 x2" />
208
211
  </component>
209
212
  </project>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: obstruct
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Author-email: LittleNightSong <LittleNightSongYO@outlook.com>
5
5
  Classifier: Development Status :: 3 - Alpha
6
6
  Classifier: Programming Language :: Python
@@ -0,0 +1 @@
1
+ version = "0.2.7"
@@ -45,3 +45,7 @@ def pack(format: CTypesFields, *data: Any) -> bytes:
45
45
 
46
46
  def unpack(format: CTypesFields, data: Buffer):
47
47
  return struct.unpack(to_format_string(format), data)
48
+
49
+
50
+ def compile_struct(struct):
51
+ struct.__compile_struct__()
@@ -53,7 +53,7 @@ class StructMeta(type):
53
53
 
54
54
  def __compile_struct__(cls):
55
55
  from obstruct.methods import to_format_string
56
- fields = dataclasses.fields(cls)
56
+ fields = [i for i in dataclasses.fields(cls) if i.init]
57
57
  real_annotations = typing.get_type_hints(cls)
58
58
 
59
59
  for field in fields:
@@ -1 +0,0 @@
1
- version = "0.2.5"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes