obstruct 0.2.9__tar.gz → 0.2.10__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 (29) hide show
  1. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/workspace.xml +16 -3
  2. {obstruct-0.2.9 → obstruct-0.2.10}/PKG-INFO +1 -1
  3. obstruct-0.2.10/src/obstruct/__version__.py +1 -0
  4. obstruct-0.2.10/src/obstruct/metadata_marks.py +5 -0
  5. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/struct_type.py +9 -1
  6. obstruct-0.2.9/src/obstruct/__version__.py +0 -1
  7. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/.gitignore +0 -0
  8. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  9. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  10. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/misc.xml +0 -0
  11. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/modules.xml +0 -0
  12. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/obstruct.iml +0 -0
  13. {obstruct-0.2.9 → obstruct-0.2.10}/.idea/vcs.xml +0 -0
  14. {obstruct-0.2.9 → obstruct-0.2.10}/README.md +0 -0
  15. {obstruct-0.2.9 → obstruct-0.2.10}/pyproject.toml +0 -0
  16. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/__init__.py +0 -0
  17. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/aot/__init__.py +0 -0
  18. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/aot/aot.py +0 -0
  19. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/aot/base.py +0 -0
  20. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/aot/pack.py +0 -0
  21. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/aot/unpack.py +0 -0
  22. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/methods.py +0 -0
  23. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/types/__init__.py +0 -0
  24. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/types/base.py +0 -0
  25. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/types/types.py +0 -0
  26. {obstruct-0.2.9 → obstruct-0.2.10}/src/obstruct/types/types.pyi +0 -0
  27. {obstruct-0.2.9 → obstruct-0.2.10}/test/test.py +0 -0
  28. {obstruct-0.2.9 → obstruct-0.2.10}/test/test_speed.py +0 -0
  29. {obstruct-0.2.9 → obstruct-0.2.10}/uv.lock +0 -0
@@ -4,7 +4,11 @@
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="chore: 移除 test_speed.py 中的调试逻辑" />
7
+ <list default="true" id="b482b6b4-48ce-4be1-bf3c-a72ec254fa35" name="更改" comment="fix: 修复 slots 的生成逻辑">
8
+ <change afterPath="$PROJECT_DIR$/src/obstruct/metadata_marks.py" afterDir="false" />
9
+ <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/struct_type.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/obstruct/struct_type.py" afterDir="false" />
11
+ </list>
8
12
  <option name="SHOW_DIALOG" value="false" />
9
13
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
14
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -220,7 +224,15 @@
220
224
  <option name="project" value="LOCAL" />
221
225
  <updated>1786884643125</updated>
222
226
  </task>
223
- <option name="localTasksCounter" value="12" />
227
+ <task id="LOCAL-00012" summary="fix: 修复 slots 的生成逻辑">
228
+ <option name="closed" value="true" />
229
+ <created>1786966736534</created>
230
+ <option name="number" value="00012" />
231
+ <option name="presentableId" value="LOCAL-00012" />
232
+ <option name="project" value="LOCAL" />
233
+ <updated>1786966736535</updated>
234
+ </task>
235
+ <option name="localTasksCounter" value="13" />
224
236
  <servers />
225
237
  </component>
226
238
  <component name="TypeScriptGeneratedFilesManager">
@@ -249,6 +261,7 @@
249
261
  <MESSAGE value="修复:unpack.py 中没有移除的调试逻辑" />
250
262
  <MESSAGE value="修复:unpack.py 中没有移除的调试逻辑&#10;更新版本号至 0.2.8" />
251
263
  <MESSAGE value="chore: 移除 test_speed.py 中的调试逻辑" />
252
- <option name="LAST_COMMIT_MESSAGE" value="chore: 移除 test_speed.py 中的调试逻辑" />
264
+ <MESSAGE value="fix: 修复 slots 的生成逻辑" />
265
+ <option name="LAST_COMMIT_MESSAGE" value="fix: 修复 slots 的生成逻辑" />
253
266
  </component>
254
267
  </project>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: obstruct
3
- Version: 0.2.9
3
+ Version: 0.2.10
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.10"
@@ -0,0 +1,5 @@
1
+ from enum import Enum
2
+
3
+
4
+ class Marks(Enum):
5
+ NOT_A_CFIELD = 0
@@ -5,6 +5,7 @@ from collections.abc import Buffer
5
5
  from typing import Self, Generator, Any, ClassVar
6
6
 
7
7
  from obstruct.aot import create_pack_methods, create_unpack_methods
8
+ from obstruct.metadata_marks import Marks
8
9
 
9
10
 
10
11
  class CType(typing.Protocol):
@@ -53,7 +54,14 @@ class StructMeta(type):
53
54
 
54
55
  def __compile_struct__(cls):
55
56
  from obstruct.methods import to_format_string
56
- fields = [i for i in dataclasses.fields(cls) if i.init]
57
+ fields = [
58
+ i for i in dataclasses.fields(cls)
59
+
60
+ if (
61
+ typing.get_origin(i.type) is not typing.Annotated
62
+ or Marks.NOT_A_CFIELD not in i.type.__metadata__
63
+ )
64
+ ]
57
65
  real_annotations = typing.get_type_hints(cls)
58
66
 
59
67
  for field in fields:
@@ -1 +0,0 @@
1
- version = "0.2.9"
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