Skip to content

Commit

Permalink
Fix up a few things
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Dec 2, 2024
1 parent 297b70e commit 6801e88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions packages/cw-schema-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ insta = "1.40.0"
rand = { version = "0.8.5", features = ["min_const_gen"] }
serde = { workspace = true, features = ["derive"] }
serde_json = "1.0.128"
tempfile = "3.14.0"
4 changes: 2 additions & 2 deletions packages/cw-schema-codegen/tests/python_tpl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn simple_enum() {

macro_rules! validator {
($typ:ty) => {{
let a: Box<dyn FnOnce(&str) -> ()> = Box::new(|output| {
let a: Box<dyn FnOnce(&str)> = Box::new(|output| {
serde_json::from_str::<$typ>(output).unwrap();
});
a
Expand Down Expand Up @@ -130,7 +130,7 @@ fn assert_validity() {

let mut file = tempfile::NamedTempFile::with_suffix(".py").unwrap();
file.write_all(schema_output.as_bytes()).unwrap();
file.write(
file.write_all(
format!(
"import sys; print({type_name}.model_validate_json('{example}').model_dump_json())"
)
Expand Down

0 comments on commit 6801e88

Please sign in to comment.