Skip to content

Commit

Permalink
Use crates.io flatbuffers
Browse files Browse the repository at this point in the history
Alphabetize class names list
Addition `eval(repr(...))` test
Update deps
  • Loading branch information
VirxEC committed Apr 29, 2024
1 parent 267e1c8 commit 1002e3d
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 132 deletions.
128 changes: 71 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rlbot-flatbuffers-py"
version = "0.3.2"
version = "0.3.3"
edition = "2021"
description = "A Python module implemented in Rust for serializing and deserializing RLBot's flatbuffers"
repository = "https://github.com/VirxEC/rlbot-flatbuffers-py"
Expand All @@ -20,7 +20,7 @@ crate-type = ["cdylib"]
[dependencies]
pyo3 = "0.21.0"
serde = "1.0.197"
flatbuffers = { git = "https://github.com/google/flatbuffers", branch = "master" }
flatbuffers = "24.3.25"
get-size = { version = "0.1.4", features = ["derive"] }

[profile.release]
Expand Down
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,11 @@ fn mod_rs_generator(type_data: &[(String, String, Vec<Vec<String>>)]) -> io::Res
}

fn class_names_txt_generator(type_data: &[(String, String, Vec<Vec<String>>)]) -> io::Result<()> {
let class_names = type_data
let mut class_names = type_data
.iter()
.map(|(_, type_name, _)| format!(" {type_name}"))
.collect::<Vec<_>>();
class_names.sort();

let file_contents = format!("[\n{}\n]", class_names.join(",\n"));

Expand Down
1 change: 1 addition & 0 deletions pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __add__(self, other):
comm = MatchComm(3, 1, False, "Ready!", b"Hello, world!")
print(repr(comm))
print(comm)
eval(repr(comm))
print(comm.content.decode("utf-8"))
print()

Expand Down
Loading

0 comments on commit 1002e3d

Please sign in to comment.