rlbot-flatbuffers 0.18.2__tar.gz → 0.18.4__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 (25) hide show
  1. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/Cargo.lock +83 -148
  2. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/Cargo.toml +2 -2
  3. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/PKG-INFO +1 -1
  4. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/main.rs +1 -1
  5. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/pyi.rs +76 -47
  6. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/table.rs +7 -10
  7. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/pyproject.toml +3 -0
  8. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/src/lib.rs +2 -2
  9. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/LICENSE +0 -0
  10. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/README.md +0 -0
  11. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/class_inject.rs +0 -0
  12. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/enums.rs +0 -0
  13. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/structs.rs +0 -0
  14. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/codegen/unions.rs +0 -0
  15. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/color.fbs +0 -0
  16. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/comms.fbs +0 -0
  17. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/corepacket.fbs +0 -0
  18. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/gamedata.fbs +0 -0
  19. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/gamestatemanip.fbs +0 -0
  20. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/interfacepacket.fbs +0 -0
  21. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/matchconfig.fbs +0 -0
  22. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/misc.fbs +0 -0
  23. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/rendering.fbs +0 -0
  24. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/rlbot.fbs +0 -0
  25. {rlbot_flatbuffers-0.18.2 → rlbot_flatbuffers-0.18.4}/flatbuffers-schema/schema/vector.fbs +0 -0
@@ -113,9 +113,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
113
113
 
114
114
  [[package]]
115
115
  name = "bitflags"
116
- version = "2.9.4"
116
+ version = "2.10.0"
117
117
  source = "registry+https://github.com/rust-lang/crates.io-index"
118
- checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
118
+ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
119
119
 
120
120
  [[package]]
121
121
  name = "block-buffer"
@@ -128,9 +128,9 @@ dependencies = [
128
128
 
129
129
  [[package]]
130
130
  name = "cfg-if"
131
- version = "1.0.3"
131
+ version = "1.0.4"
132
132
  source = "registry+https://github.com/rust-lang/crates.io-index"
133
- checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
133
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
134
134
 
135
135
  [[package]]
136
136
  name = "codespan"
@@ -261,9 +261,9 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
261
261
 
262
262
  [[package]]
263
263
  name = "generic-array"
264
- version = "0.14.7"
264
+ version = "0.14.9"
265
265
  source = "registry+https://github.com/rust-lang/crates.io-index"
266
- checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
266
+ checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2"
267
267
  dependencies = [
268
268
  "typenum",
269
269
  "version_check",
@@ -271,14 +271,14 @@ dependencies = [
271
271
 
272
272
  [[package]]
273
273
  name = "getrandom"
274
- version = "0.3.3"
274
+ version = "0.3.4"
275
275
  source = "registry+https://github.com/rust-lang/crates.io-index"
276
- checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
276
+ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
277
277
  dependencies = [
278
278
  "cfg-if",
279
279
  "libc",
280
280
  "r-efi",
281
- "wasi",
281
+ "wasip2",
282
282
  ]
283
283
 
284
284
  [[package]]
@@ -292,6 +292,12 @@ dependencies = [
292
292
  "foldhash",
293
293
  ]
294
294
 
295
+ [[package]]
296
+ name = "hashbrown"
297
+ version = "0.16.0"
298
+ source = "registry+https://github.com/rust-lang/crates.io-index"
299
+ checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
300
+
295
301
  [[package]]
296
302
  name = "heck"
297
303
  version = "0.5.0"
@@ -315,19 +321,22 @@ checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5"
315
321
 
316
322
  [[package]]
317
323
  name = "indexmap"
318
- version = "2.11.1"
324
+ version = "2.12.0"
319
325
  source = "registry+https://github.com/rust-lang/crates.io-index"
320
- checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921"
326
+ checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
321
327
  dependencies = [
322
328
  "equivalent",
323
- "hashbrown",
329
+ "hashbrown 0.16.0",
324
330
  ]
325
331
 
326
332
  [[package]]
327
333
  name = "indoc"
328
- version = "2.0.6"
334
+ version = "2.0.7"
329
335
  source = "registry+https://github.com/rust-lang/crates.io-index"
330
- checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
336
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
337
+ dependencies = [
338
+ "rustversion",
339
+ ]
331
340
 
332
341
  [[package]]
333
342
  name = "itertools"
@@ -387,9 +396,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
387
396
 
388
397
  [[package]]
389
398
  name = "libc"
390
- version = "0.2.175"
399
+ version = "0.2.177"
391
400
  source = "registry+https://github.com/rust-lang/crates.io-index"
392
- checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
401
+ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
393
402
 
394
403
  [[package]]
395
404
  name = "libm"
@@ -399,11 +408,10 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
399
408
 
400
409
  [[package]]
401
410
  name = "lock_api"
402
- version = "0.4.13"
411
+ version = "0.4.14"
403
412
  source = "registry+https://github.com/rust-lang/crates.io-index"
404
- checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
413
+ checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
405
414
  dependencies = [
406
- "autocfg",
407
415
  "scopeguard",
408
416
  ]
409
417
 
@@ -449,9 +457,9 @@ dependencies = [
449
457
 
450
458
  [[package]]
451
459
  name = "memchr"
452
- version = "2.7.5"
460
+ version = "2.7.6"
453
461
  source = "registry+https://github.com/rust-lang/crates.io-index"
454
- checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
462
+ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
455
463
 
456
464
  [[package]]
457
465
  name = "memoffset"
@@ -517,9 +525,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
517
525
 
518
526
  [[package]]
519
527
  name = "parking_lot"
520
- version = "0.12.4"
528
+ version = "0.12.5"
521
529
  source = "registry+https://github.com/rust-lang/crates.io-index"
522
- checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
530
+ checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
523
531
  dependencies = [
524
532
  "lock_api",
525
533
  "parking_lot_core",
@@ -527,15 +535,15 @@ dependencies = [
527
535
 
528
536
  [[package]]
529
537
  name = "parking_lot_core"
530
- version = "0.9.11"
538
+ version = "0.9.12"
531
539
  source = "registry+https://github.com/rust-lang/crates.io-index"
532
- checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
540
+ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
533
541
  dependencies = [
534
542
  "cfg-if",
535
543
  "libc",
536
544
  "redox_syscall",
537
545
  "smallvec",
538
- "windows-targets",
546
+ "windows-link",
539
547
  ]
540
548
 
541
549
  [[package]]
@@ -575,7 +583,7 @@ version = "1.1.1"
575
583
  source = "git+https://github.com/swz-git/planus?rev=a0b1fbf#a0b1fbf28458389e2d3dc7598d257231103d9497"
576
584
  dependencies = [
577
585
  "array-init-cursor",
578
- "hashbrown",
586
+ "hashbrown 0.15.5",
579
587
  ]
580
588
 
581
589
  [[package]]
@@ -654,18 +662,18 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
654
662
 
655
663
  [[package]]
656
664
  name = "proc-macro2"
657
- version = "1.0.101"
665
+ version = "1.0.102"
658
666
  source = "registry+https://github.com/rust-lang/crates.io-index"
659
- checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
667
+ checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7"
660
668
  dependencies = [
661
669
  "unicode-ident",
662
670
  ]
663
671
 
664
672
  [[package]]
665
673
  name = "pyo3"
666
- version = "0.26.0"
674
+ version = "0.27.1"
667
675
  source = "registry+https://github.com/rust-lang/crates.io-index"
668
- checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383"
676
+ checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf"
669
677
  dependencies = [
670
678
  "indoc",
671
679
  "libc",
@@ -680,18 +688,18 @@ dependencies = [
680
688
 
681
689
  [[package]]
682
690
  name = "pyo3-build-config"
683
- version = "0.26.0"
691
+ version = "0.27.1"
684
692
  source = "registry+https://github.com/rust-lang/crates.io-index"
685
- checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f"
693
+ checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb"
686
694
  dependencies = [
687
695
  "target-lexicon",
688
696
  ]
689
697
 
690
698
  [[package]]
691
699
  name = "pyo3-ffi"
692
- version = "0.26.0"
700
+ version = "0.27.1"
693
701
  source = "registry+https://github.com/rust-lang/crates.io-index"
694
- checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105"
702
+ checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be"
695
703
  dependencies = [
696
704
  "libc",
697
705
  "pyo3-build-config",
@@ -699,9 +707,9 @@ dependencies = [
699
707
 
700
708
  [[package]]
701
709
  name = "pyo3-macros"
702
- version = "0.26.0"
710
+ version = "0.27.1"
703
711
  source = "registry+https://github.com/rust-lang/crates.io-index"
704
- checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded"
712
+ checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71"
705
713
  dependencies = [
706
714
  "proc-macro2",
707
715
  "pyo3-macros-backend",
@@ -711,9 +719,9 @@ dependencies = [
711
719
 
712
720
  [[package]]
713
721
  name = "pyo3-macros-backend"
714
- version = "0.26.0"
722
+ version = "0.27.1"
715
723
  source = "registry+https://github.com/rust-lang/crates.io-index"
716
- checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf"
724
+ checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b"
717
725
  dependencies = [
718
726
  "heck",
719
727
  "proc-macro2",
@@ -724,9 +732,9 @@ dependencies = [
724
732
 
725
733
  [[package]]
726
734
  name = "quote"
727
- version = "1.0.40"
735
+ version = "1.0.41"
728
736
  source = "registry+https://github.com/rust-lang/crates.io-index"
729
- checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
737
+ checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
730
738
  dependencies = [
731
739
  "proc-macro2",
732
740
  ]
@@ -777,18 +785,18 @@ dependencies = [
777
785
 
778
786
  [[package]]
779
787
  name = "redox_syscall"
780
- version = "0.5.17"
788
+ version = "0.5.18"
781
789
  source = "registry+https://github.com/rust-lang/crates.io-index"
782
- checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
790
+ checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
783
791
  dependencies = [
784
792
  "bitflags",
785
793
  ]
786
794
 
787
795
  [[package]]
788
796
  name = "regex"
789
- version = "1.11.2"
797
+ version = "1.12.2"
790
798
  source = "registry+https://github.com/rust-lang/crates.io-index"
791
- checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
799
+ checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
792
800
  dependencies = [
793
801
  "aho-corasick",
794
802
  "memchr",
@@ -798,9 +806,9 @@ dependencies = [
798
806
 
799
807
  [[package]]
800
808
  name = "regex-automata"
801
- version = "0.4.10"
809
+ version = "0.4.13"
802
810
  source = "registry+https://github.com/rust-lang/crates.io-index"
803
- checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
811
+ checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
804
812
  dependencies = [
805
813
  "aho-corasick",
806
814
  "memchr",
@@ -809,13 +817,13 @@ dependencies = [
809
817
 
810
818
  [[package]]
811
819
  name = "regex-syntax"
812
- version = "0.8.6"
820
+ version = "0.8.8"
813
821
  source = "registry+https://github.com/rust-lang/crates.io-index"
814
- checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
822
+ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
815
823
 
816
824
  [[package]]
817
825
  name = "rlbot_flatbuffers"
818
- version = "0.18.2"
826
+ version = "0.18.4"
819
827
  dependencies = [
820
828
  "eyre",
821
829
  "indexmap",
@@ -864,9 +872,9 @@ checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
864
872
 
865
873
  [[package]]
866
874
  name = "serde"
867
- version = "1.0.223"
875
+ version = "1.0.228"
868
876
  source = "registry+https://github.com/rust-lang/crates.io-index"
869
- checksum = "a505d71960adde88e293da5cb5eda57093379f64e61cf77bf0e6a63af07a7bac"
877
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
870
878
  dependencies = [
871
879
  "serde_core",
872
880
  "serde_derive",
@@ -874,18 +882,18 @@ dependencies = [
874
882
 
875
883
  [[package]]
876
884
  name = "serde_core"
877
- version = "1.0.223"
885
+ version = "1.0.228"
878
886
  source = "registry+https://github.com/rust-lang/crates.io-index"
879
- checksum = "20f57cbd357666aa7b3ac84a90b4ea328f1d4ddb6772b430caa5d9e1309bb9e9"
887
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
880
888
  dependencies = [
881
889
  "serde_derive",
882
890
  ]
883
891
 
884
892
  [[package]]
885
893
  name = "serde_derive"
886
- version = "1.0.223"
894
+ version = "1.0.228"
887
895
  source = "registry+https://github.com/rust-lang/crates.io-index"
888
- checksum = "3d428d07faf17e306e699ec1e91996e5a165ba5d6bce5b5155173e91a8a01a56"
896
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
889
897
  dependencies = [
890
898
  "proc-macro2",
891
899
  "quote",
@@ -920,7 +928,7 @@ version = "0.19.0"
920
928
  source = "registry+https://github.com/rust-lang/crates.io-index"
921
929
  checksum = "23de088478b31c349c9ba67816fa55d9355232d63c3afea8bf513e31f0f1d2c0"
922
930
  dependencies = [
923
- "hashbrown",
931
+ "hashbrown 0.15.5",
924
932
  "serde",
925
933
  ]
926
934
 
@@ -938,9 +946,9 @@ dependencies = [
938
946
 
939
947
  [[package]]
940
948
  name = "syn"
941
- version = "2.0.106"
949
+ version = "2.0.108"
942
950
  source = "registry+https://github.com/rust-lang/crates.io-index"
943
- checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
951
+ checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
944
952
  dependencies = [
945
953
  "proc-macro2",
946
954
  "quote",
@@ -973,18 +981,18 @@ dependencies = [
973
981
 
974
982
  [[package]]
975
983
  name = "thiserror"
976
- version = "2.0.16"
984
+ version = "2.0.17"
977
985
  source = "registry+https://github.com/rust-lang/crates.io-index"
978
- checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
986
+ checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
979
987
  dependencies = [
980
988
  "thiserror-impl",
981
989
  ]
982
990
 
983
991
  [[package]]
984
992
  name = "thiserror-impl"
985
- version = "2.0.16"
993
+ version = "2.0.17"
986
994
  source = "registry+https://github.com/rust-lang/crates.io-index"
987
- checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
995
+ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
988
996
  dependencies = [
989
997
  "proc-macro2",
990
998
  "quote",
@@ -993,9 +1001,9 @@ dependencies = [
993
1001
 
994
1002
  [[package]]
995
1003
  name = "typenum"
996
- version = "1.18.0"
1004
+ version = "1.19.0"
997
1005
  source = "registry+https://github.com/rust-lang/crates.io-index"
998
- checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
1006
+ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
999
1007
 
1000
1008
  [[package]]
1001
1009
  name = "unicase"
@@ -1005,9 +1013,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
1005
1013
 
1006
1014
  [[package]]
1007
1015
  name = "unicode-ident"
1008
- version = "1.0.19"
1016
+ version = "1.0.20"
1009
1017
  source = "registry+https://github.com/rust-lang/crates.io-index"
1010
- checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
1018
+ checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
1011
1019
 
1012
1020
  [[package]]
1013
1021
  name = "unicode-segmentation"
@@ -1055,20 +1063,11 @@ dependencies = [
1055
1063
  "winapi-util",
1056
1064
  ]
1057
1065
 
1058
- [[package]]
1059
- name = "wasi"
1060
- version = "0.14.5+wasi-0.2.4"
1061
- source = "registry+https://github.com/rust-lang/crates.io-index"
1062
- checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4"
1063
- dependencies = [
1064
- "wasip2",
1065
- ]
1066
-
1067
1066
  [[package]]
1068
1067
  name = "wasip2"
1069
- version = "1.0.0+wasi-0.2.4"
1068
+ version = "1.0.1+wasi-0.2.4"
1070
1069
  source = "registry+https://github.com/rust-lang/crates.io-index"
1071
- checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24"
1070
+ checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
1072
1071
  dependencies = [
1073
1072
  "wit-bindgen",
1074
1073
  ]
@@ -1084,88 +1083,24 @@ dependencies = [
1084
1083
 
1085
1084
  [[package]]
1086
1085
  name = "windows-link"
1087
- version = "0.2.0"
1086
+ version = "0.2.1"
1088
1087
  source = "registry+https://github.com/rust-lang/crates.io-index"
1089
- checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
1088
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
1090
1089
 
1091
1090
  [[package]]
1092
1091
  name = "windows-sys"
1093
- version = "0.61.0"
1092
+ version = "0.61.2"
1094
1093
  source = "registry+https://github.com/rust-lang/crates.io-index"
1095
- checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa"
1094
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
1096
1095
  dependencies = [
1097
1096
  "windows-link",
1098
1097
  ]
1099
1098
 
1100
- [[package]]
1101
- name = "windows-targets"
1102
- version = "0.52.6"
1103
- source = "registry+https://github.com/rust-lang/crates.io-index"
1104
- checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
1105
- dependencies = [
1106
- "windows_aarch64_gnullvm",
1107
- "windows_aarch64_msvc",
1108
- "windows_i686_gnu",
1109
- "windows_i686_gnullvm",
1110
- "windows_i686_msvc",
1111
- "windows_x86_64_gnu",
1112
- "windows_x86_64_gnullvm",
1113
- "windows_x86_64_msvc",
1114
- ]
1115
-
1116
- [[package]]
1117
- name = "windows_aarch64_gnullvm"
1118
- version = "0.52.6"
1119
- source = "registry+https://github.com/rust-lang/crates.io-index"
1120
- checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
1121
-
1122
- [[package]]
1123
- name = "windows_aarch64_msvc"
1124
- version = "0.52.6"
1125
- source = "registry+https://github.com/rust-lang/crates.io-index"
1126
- checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
1127
-
1128
- [[package]]
1129
- name = "windows_i686_gnu"
1130
- version = "0.52.6"
1131
- source = "registry+https://github.com/rust-lang/crates.io-index"
1132
- checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
1133
-
1134
- [[package]]
1135
- name = "windows_i686_gnullvm"
1136
- version = "0.52.6"
1137
- source = "registry+https://github.com/rust-lang/crates.io-index"
1138
- checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
1139
-
1140
- [[package]]
1141
- name = "windows_i686_msvc"
1142
- version = "0.52.6"
1143
- source = "registry+https://github.com/rust-lang/crates.io-index"
1144
- checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
1145
-
1146
- [[package]]
1147
- name = "windows_x86_64_gnu"
1148
- version = "0.52.6"
1149
- source = "registry+https://github.com/rust-lang/crates.io-index"
1150
- checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
1151
-
1152
- [[package]]
1153
- name = "windows_x86_64_gnullvm"
1154
- version = "0.52.6"
1155
- source = "registry+https://github.com/rust-lang/crates.io-index"
1156
- checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
1157
-
1158
- [[package]]
1159
- name = "windows_x86_64_msvc"
1160
- version = "0.52.6"
1161
- source = "registry+https://github.com/rust-lang/crates.io-index"
1162
- checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
1163
-
1164
1099
  [[package]]
1165
1100
  name = "wit-bindgen"
1166
- version = "0.45.1"
1101
+ version = "0.46.0"
1167
1102
  source = "registry+https://github.com/rust-lang/crates.io-index"
1168
- checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36"
1103
+ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
1169
1104
 
1170
1105
  [[package]]
1171
1106
  name = "zerocopy"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "rlbot_flatbuffers"
3
- version = "0.18.2"
3
+ version = "0.18.4"
4
4
  edition = "2024"
5
5
  description = "A Python module implemented in Rust for serializing and deserializing RLBot's flatbuffers"
6
6
  repository = "https://github.com/RLBot/flatbuffers-python"
@@ -18,7 +18,7 @@ all = "warn"
18
18
  crate-type = ["cdylib"]
19
19
 
20
20
  [dependencies]
21
- pyo3 = "0.26.0"
21
+ pyo3 = "0.27.0"
22
22
  planus = { git = "https://github.com/swz-git/planus", rev = "a0b1fbf" }
23
23
 
24
24
  [build-dependencies]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rlbot_flatbuffers
3
- Version: 0.18.2
3
+ Version: 0.18.4
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -277,7 +277,7 @@ fn main() -> eyre::Result<()> {
277
277
  fs::write(OUT_FILE, format_string(&generated_planus)?.as_bytes())?;
278
278
 
279
279
  class_inject::classes_to_lib_rs(class_names)?;
280
- pyi::generator(&declarations.declarations)?;
280
+ pyi::generator(&declarations)?;
281
281
 
282
282
  Ok(())
283
283
  }
@@ -1,8 +1,7 @@
1
1
  use crate::{enums::normalize_caps, structs::DEFAULT_OVERRIDES};
2
- use indexmap::IndexMap;
3
2
  use planus_types::{
4
3
  ast::IntegerType,
5
- intermediate::{AbsolutePath, AssignMode, Declaration, DeclarationKind, SimpleType, TypeKind},
4
+ intermediate::{AssignMode, DeclarationKind, Declarations, SimpleType, TypeKind},
6
5
  };
7
6
  use std::{borrow::Cow, fs, io};
8
7
 
@@ -18,7 +17,7 @@ macro_rules! write_fmt {
18
17
  };
19
18
  }
20
19
 
21
- pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<()> {
20
+ pub fn generator(type_data: &Declarations) -> io::Result<()> {
22
21
  let mut file = vec![
23
22
  Cow::Borrowed("from __future__ import annotations"),
24
23
  Cow::Borrowed(""),
@@ -31,10 +30,29 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
31
30
  Cow::Borrowed(""),
32
31
  ];
33
32
 
34
- let mut sorted_types: Vec<_> = type_data.iter().collect();
35
- sorted_types.sort_by(|(a, _), (b, _)| a.0.last().unwrap().cmp(b.0.last().unwrap()));
36
-
37
- for (full_type_name, item) in sorted_types {
33
+ let mut sorted_types: Vec<_> = type_data.iter_declarations().collect();
34
+ sorted_types.sort_by_cached_key(|(idx, full_type_name, item)| match &item.kind {
35
+ DeclarationKind::Enum(_) => (0, 0, 0, 0, full_type_name.0.last().unwrap().as_str()),
36
+ DeclarationKind::Struct(item) => (
37
+ 1,
38
+ item.fields
39
+ .iter()
40
+ .any(|(_, item)| matches!(item.type_, SimpleType::Struct(_))) as usize,
41
+ 0,
42
+ 0,
43
+ full_type_name.0.last().unwrap().as_str(),
44
+ ),
45
+ DeclarationKind::Table(_) | DeclarationKind::Union(_) => (
46
+ 2,
47
+ 0,
48
+ usize::MAX - type_data.parents[idx.0].len(),
49
+ type_data.children[idx.0].len(),
50
+ full_type_name.0.last().unwrap().as_str(),
51
+ ),
52
+ _ => unreachable!(),
53
+ });
54
+
55
+ for (_, full_type_name, item) in sorted_types {
38
56
  if matches!(item.kind, DeclarationKind::Union(_)) {
39
57
  continue;
40
58
  }
@@ -56,26 +74,29 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
56
74
  match &item.kind {
57
75
  DeclarationKind::Enum(info) => {
58
76
  for (var_val, var_info) in &info.variants {
59
- write_fmt!(
60
- file,
61
- " {} = {type_name}({var_val})",
62
- normalize_caps(&var_info.name)
63
- );
77
+ let field_name = normalize_caps(&var_info.name);
78
+ write_fmt!(file, " {field_name}: {type_name}");
79
+
80
+ write_str!(file, " \"\"\"");
81
+ write_fmt!(file, " `assert int({type_name}.{field_name}) == {var_val}`");
64
82
 
65
83
  if !var_info.docstrings.docstrings.is_empty() {
66
- write_str!(file, " \"\"\"");
84
+ write_str!(file, "");
67
85
 
68
86
  for line in &var_info.docstrings.docstrings {
69
87
  write_fmt!(file, " {}", line.value.trim());
70
88
  }
71
-
72
- write_str!(file, " \"\"\"");
73
89
  }
90
+
91
+ write_str!(file, " \"\"\"");
74
92
  }
75
93
 
76
94
  write_str!(file, "");
77
- write_str!(file, " def __new__(cls, value: int = 0): ...");
78
- write_str!(file, " def __init__(self, value: int = 0):");
95
+ write_fmt!(
96
+ file,
97
+ " def __new__(cls, value: int = 0) -> {type_name}: ..."
98
+ );
99
+ write_str!(file, " def __init__(self, value: int = 0) -> None:");
79
100
  write_str!(file, " \"\"\"");
80
101
  write_str!(
81
102
  file,
@@ -93,11 +114,11 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
93
114
  SimpleType::Float(_) => "float",
94
115
  SimpleType::Integer(_) => "int",
95
116
  SimpleType::Enum(idx) => {
96
- let (path, _) = type_data.get_index(idx.0).unwrap();
117
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
97
118
  path.0.last().unwrap()
98
119
  }
99
120
  SimpleType::Struct(idx) => {
100
- let (path, _) = type_data.get_index(idx.0).unwrap();
121
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
101
122
  path.0.last().unwrap()
102
123
  }
103
124
  });
@@ -116,8 +137,8 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
116
137
  }
117
138
 
118
139
  if info.fields.is_empty() {
119
- write_str!(file, " def __new__(cls): ...");
120
- write_str!(file, " def __init__(self): ...\n");
140
+ write_fmt!(file, " def __new__(cls) -> {type_name}: ...");
141
+ write_str!(file, " def __init__(self) -> None: ...\n");
121
142
  continue;
122
143
  }
123
144
 
@@ -130,7 +151,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
130
151
  write_str!(file, " )");
131
152
  write_str!(file, "");
132
153
 
133
- let inits = [("new", "cls"), ("init", "self")];
154
+ let inits = [("new", "cls", type_name.as_str()), ("init", "self", "None")];
134
155
 
135
156
  let default_overrides: Vec<_> = DEFAULT_OVERRIDES
136
157
  .into_iter()
@@ -143,7 +164,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
143
164
  })
144
165
  .collect();
145
166
 
146
- for (func, first_arg) in inits {
167
+ for (func, first_arg, ret_type) in inits {
147
168
  write_fmt!(file, " def __{func}__(");
148
169
  write_fmt!(file, " {first_arg},");
149
170
 
@@ -153,11 +174,11 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
153
174
  SimpleType::Float(_) => "float",
154
175
  SimpleType::Integer(_) => "int",
155
176
  SimpleType::Enum(idx) => {
156
- let (path, _) = type_data.get_index(idx.0).unwrap();
177
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
157
178
  path.0.last().unwrap()
158
179
  }
159
180
  SimpleType::Struct(idx) => {
160
- let (path, _) = type_data.get_index(idx.0).unwrap();
181
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
161
182
  path.0.last().unwrap()
162
183
  }
163
184
  });
@@ -175,7 +196,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
175
196
  SimpleType::Float(_) => Cow::Borrowed("0.0"),
176
197
  SimpleType::Integer(_) => Cow::Borrowed("0"),
177
198
  SimpleType::Enum(idx) | SimpleType::Struct(idx) => {
178
- let (path, _) = type_data.get_index(idx.0).unwrap();
199
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
179
200
  let name = path.0.last().unwrap();
180
201
  Cow::Owned(format!("{name}()"))
181
202
  }
@@ -187,7 +208,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
187
208
  );
188
209
  }
189
210
 
190
- write_str!(file, " ): ...");
211
+ write_fmt!(file, " ) -> {ret_type}: ...");
191
212
  }
192
213
  }
193
214
  DeclarationKind::Table(info) => {
@@ -198,11 +219,11 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
198
219
  SimpleType::Float(_) => "float",
199
220
  SimpleType::Integer(_) => "int",
200
221
  SimpleType::Enum(idx) => {
201
- let (path, _) = type_data.get_index(idx.0).unwrap();
222
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
202
223
  path.0.last().unwrap()
203
224
  }
204
225
  SimpleType::Struct(idx) => {
205
- let (path, _) = type_data.get_index(idx.0).unwrap();
226
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
206
227
  match path.0.last().unwrap().as_str() {
207
228
  "Float" => "float",
208
229
  name => name,
@@ -210,7 +231,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
210
231
  }
211
232
  }),
212
233
  TypeKind::Union(idx) => {
213
- let (_, info) = type_data.get_index(idx.0).unwrap();
234
+ let (_, info) = type_data.declarations.get_index(idx.0).unwrap();
214
235
  let DeclarationKind::Union(union_info) = &info.kind else {
215
236
  unreachable!()
216
237
  };
@@ -221,7 +242,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
221
242
  Cow::Owned(keys.join(" | "))
222
243
  }
223
244
  TypeKind::Table(idx) => {
224
- let (path, _) = type_data.get_index(idx.0).unwrap();
245
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
225
246
  Cow::Borrowed(path.0.last().unwrap().as_str())
226
247
  }
227
248
  TypeKind::String => Cow::Borrowed("str"),
@@ -232,14 +253,15 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
232
253
  SimpleType::Integer(IntegerType::U8) => Cow::Borrowed("bytes"),
233
254
  SimpleType::Integer(_) => Cow::Borrowed("Sequence[int]"),
234
255
  SimpleType::Enum(idx) | SimpleType::Struct(idx) => {
235
- let (path, _) = type_data.get_index(idx.0).unwrap();
256
+ let (path, _) =
257
+ type_data.declarations.get_index(idx.0).unwrap();
236
258
  let name = path.0.last().unwrap().as_str();
237
259
  Cow::Owned(format!("Sequence[{name}]"))
238
260
  }
239
261
  },
240
262
  TypeKind::String => Cow::Borrowed("Sequence[str]"),
241
263
  TypeKind::Table(idx) => {
242
- let (path, _) = type_data.get_index(idx.0).unwrap();
264
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
243
265
  let name = path.0.last().unwrap().as_str();
244
266
  Cow::Owned(format!("Sequence[{name}]"))
245
267
  }
@@ -268,8 +290,8 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
268
290
  }
269
291
 
270
292
  if info.fields.is_empty() {
271
- write_str!(file, " def __new__(cls): ...");
272
- write_str!(file, " def __init__(self): ...\n");
293
+ write_fmt!(file, " def __new__(cls) -> {type_name}: ...");
294
+ write_str!(file, " def __init__(self) -> None: ...\n");
273
295
  continue;
274
296
  }
275
297
 
@@ -282,9 +304,9 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
282
304
  write_str!(file, " )");
283
305
  write_str!(file, "");
284
306
 
285
- let inits = [("new", "cls"), ("init", "self")];
307
+ let inits = [("new", "cls", type_name.as_str()), ("init", "self", "None")];
286
308
 
287
- for (func, first_arg) in inits {
309
+ for (func, first_arg, ret_type) in inits {
288
310
  write_fmt!(file, " def __{func}__(");
289
311
  write_fmt!(file, " {first_arg},");
290
312
 
@@ -295,11 +317,13 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
295
317
  SimpleType::Float(_) => "float",
296
318
  SimpleType::Integer(_) => "int",
297
319
  SimpleType::Enum(idx) => {
298
- let (path, _) = type_data.get_index(idx.0).unwrap();
320
+ let (path, _) =
321
+ type_data.declarations.get_index(idx.0).unwrap();
299
322
  path.0.last().unwrap()
300
323
  }
301
324
  SimpleType::Struct(idx) => {
302
- let (path, _) = type_data.get_index(idx.0).unwrap();
325
+ let (path, _) =
326
+ type_data.declarations.get_index(idx.0).unwrap();
303
327
  match path.0.last().unwrap().as_str() {
304
328
  "Float" => "float",
305
329
  name => name,
@@ -307,11 +331,11 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
307
331
  }
308
332
  }),
309
333
  TypeKind::Table(idx) => {
310
- let (path, _) = type_data.get_index(idx.0).unwrap();
334
+ let (path, _) = type_data.declarations.get_index(idx.0).unwrap();
311
335
  Cow::Borrowed(path.0.last().unwrap().as_str())
312
336
  }
313
337
  TypeKind::Union(idx) => {
314
- let (_, info) = type_data.get_index(idx.0).unwrap();
338
+ let (_, info) = type_data.declarations.get_index(idx.0).unwrap();
315
339
  let DeclarationKind::Union(union_info) = &info.kind else {
316
340
  unreachable!()
317
341
  };
@@ -330,14 +354,16 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
330
354
  SimpleType::Integer(IntegerType::U8) => Cow::Borrowed("bytes"),
331
355
  SimpleType::Integer(_) => Cow::Borrowed("Sequence[int]"),
332
356
  SimpleType::Enum(idx) | SimpleType::Struct(idx) => {
333
- let (path, _) = type_data.get_index(idx.0).unwrap();
357
+ let (path, _) =
358
+ type_data.declarations.get_index(idx.0).unwrap();
334
359
  let name = path.0.last().unwrap().as_str();
335
360
  Cow::Owned(format!("Sequence[{name}]"))
336
361
  }
337
362
  },
338
363
  TypeKind::String => Cow::Borrowed("Sequence[str]"),
339
364
  TypeKind::Table(idx) => {
340
- let (path, _) = type_data.get_index(idx.0).unwrap();
365
+ let (path, _) =
366
+ type_data.declarations.get_index(idx.0).unwrap();
341
367
  let name = path.0.last().unwrap().as_str();
342
368
  Cow::Owned(format!("Sequence[{name}]"))
343
369
  }
@@ -360,7 +386,8 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
360
386
  SimpleType::Float(_) => Cow::Borrowed("0.0"),
361
387
  SimpleType::Integer(_) => Cow::Borrowed("0"),
362
388
  SimpleType::Enum(idx) | SimpleType::Struct(idx) => {
363
- let (path, _) = type_data.get_index(idx.0).unwrap();
389
+ let (path, _) =
390
+ type_data.declarations.get_index(idx.0).unwrap();
364
391
  let name = path.0.last().unwrap();
365
392
  Cow::Owned(format!("{name}()"))
366
393
  }
@@ -373,12 +400,14 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
373
400
  _ => Cow::Borrowed("[]"),
374
401
  },
375
402
  TypeKind::Table(idx) => {
376
- let (path, _) = type_data.get_index(idx.0).unwrap();
403
+ let (path, _) =
404
+ type_data.declarations.get_index(idx.0).unwrap();
377
405
  let name = path.0.last().unwrap();
378
406
  Cow::Owned(format!("{name}()"))
379
407
  }
380
408
  TypeKind::Union(idx) => {
381
- let (_, info) = type_data.get_index(idx.0).unwrap();
409
+ let (_, info) =
410
+ type_data.declarations.get_index(idx.0).unwrap();
382
411
  let DeclarationKind::Union(union_info) = &info.kind else {
383
412
  unreachable!()
384
413
  };
@@ -398,7 +427,7 @@ pub fn generator(type_data: &IndexMap<AbsolutePath, Declaration>) -> io::Result<
398
427
  );
399
428
  }
400
429
 
401
- write_str!(file, " ): ...");
430
+ write_fmt!(file, " ) -> {ret_type}: ...");
402
431
  }
403
432
 
404
433
  write_str!(file, " def pack(self) -> bytes:");
@@ -363,12 +363,12 @@ impl<'a> TableBindGenerator<'a> {
363
363
  match field_info.assign_mode {
364
364
  AssignMode::Optional => {
365
365
  format!(
366
- "py_type.{field_name}.as_ref().map(|x| super::{name}::from_py_object_bound(x.bind_borrowed(py)).as_ref().unwrap().into_gil(py))"
366
+ "py_type.{field_name}.as_ref().map(|x| super::{name}::extract(x.bind_borrowed(py)).as_ref().unwrap().into_gil(py))"
367
367
  )
368
368
  }
369
369
  _ => {
370
370
  format!(
371
- "super::{name}::from_py_object_bound(py_type.{field_name}.bind_borrowed(py)).as_ref().unwrap().into_gil(py)"
371
+ "super::{name}::extract(py_type.{field_name}.bind_borrowed(py)).as_ref().unwrap().into_gil(py)"
372
372
  )
373
373
  }
374
374
  }
@@ -727,7 +727,7 @@ impl<'a> TableBindGenerator<'a> {
727
727
  );
728
728
  write_fmt!(
729
729
  self,
730
- " super::{name}::from_py_object_bound(i.bind_borrowed(py))"
730
+ " super::{name}::extract(i.bind_borrowed(py))"
731
731
  );
732
732
  write_str!(self, " .unwrap().__repr__(py)");
733
733
  write_str!(self, " }),");
@@ -735,7 +735,7 @@ impl<'a> TableBindGenerator<'a> {
735
735
  _ => {
736
736
  write_fmt!(
737
737
  self,
738
- " super::{name}::from_py_object_bound(self.{field_name}.bind_borrowed(py))"
738
+ " super::{name}::extract(self.{field_name}.bind_borrowed(py))"
739
739
  );
740
740
  write_str!(self, " .unwrap().__repr__(py),");
741
741
  }
@@ -758,7 +758,7 @@ impl<'a> TableBindGenerator<'a> {
758
758
  write_str!(self, " .iter()");
759
759
  write_fmt!(
760
760
  self,
761
- " .map(|x| x.downcast_into::<super::{name}>().unwrap().borrow().__repr__(py))"
761
+ " .map(|x| x.cast_into::<super::{name}>().unwrap().borrow().__repr__(py))"
762
762
  );
763
763
  }
764
764
  _ => {
@@ -781,7 +781,7 @@ impl<'a> TableBindGenerator<'a> {
781
781
  write_str!(self, " .iter()");
782
782
  write_fmt!(
783
783
  self,
784
- " .map(|x| x.downcast_into::<super::{name}>().unwrap().borrow().__repr__(py))"
784
+ " .map(|x| x.cast_into::<super::{name}>().unwrap().borrow().__repr__(py))"
785
785
  );
786
786
  }
787
787
  _ => continue,
@@ -912,10 +912,7 @@ impl<'a> TableBindGenerator<'a> {
912
912
  }));
913
913
 
914
914
  write_str!(self, "use planus::{Builder, ReadAsRoot};");
915
- write_str!(
916
- self,
917
- "use pyo3::{conversion::FromPyObjectBound, prelude::*, types::*};"
918
- );
915
+ write_str!(self, "use pyo3::{prelude::*, types::*};");
919
916
  write_str!(self, "");
920
917
 
921
918
  self.generate_definition();
@@ -14,3 +14,6 @@ dynamic = ["version", "description", "urls", "readme"]
14
14
 
15
15
  [tool.maturin]
16
16
  features = ["pyo3/extension-module", "pyo3/abi3-py310"]
17
+
18
+ [tool.ruff.lint]
19
+ ignore = ["F403", "F405"]
@@ -73,7 +73,7 @@ where
73
73
  T: PyClass,
74
74
  U: for<'a> FromGil<&'a T>,
75
75
  {
76
- (&*obj.downcast_into::<T>().unwrap().borrow()).into_gil(py)
76
+ (&*obj.cast_into::<T>().unwrap().borrow()).into_gil(py)
77
77
  }
78
78
 
79
79
  fn into_pystringlist_from(py: Python, obj: Vec<String>) -> Py<PyList> {
@@ -83,7 +83,7 @@ fn into_pystringlist_from(py: Python, obj: Vec<String>) -> Py<PyList> {
83
83
  }
84
84
 
85
85
  fn from_pystring_into(obj: Bound<PyAny>) -> String {
86
- obj.downcast_into::<PyString>()
86
+ obj.cast_into::<PyString>()
87
87
  .unwrap()
88
88
  .to_str()
89
89
  .unwrap()