Skip to content

Commit

Permalink
Merge pull request #164 from argyle-engineering/relese-prep
Browse files Browse the repository at this point in the history
Relese prep
  • Loading branch information
povilasb authored Nov 13, 2024
2 parents 9f5cc6c + 1be5599 commit 3ddfca1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pydantic2zod"
version = "0.1.0"
version = "0.1.1"
description = "Pydantic to zod declaration compiler."
authors = ["Povilas Balciunas <[email protected]>"]
documentation = "https://github.com/argyle-engineering/pydantic2zod"
Expand Down
37 changes: 18 additions & 19 deletions tests/snapshots/snap_test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

from snapshottest import Snapshot


snapshots = Snapshot()

snapshots['test_annotated_fields 1'] = '''
snapshots["test_annotated_fields 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -20,9 +19,9 @@
salary: z.number().gt(1000).lt(10000),
}).strict();
export type EmployeeType = z.infer<typeof Employee>;
'''
"""

snapshots['test_builtin_types 1'] = '''
snapshots["test_builtin_types 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -39,9 +38,9 @@
]),
}).strict();
export type UserType = z.infer<typeof User>;
'''
"""

snapshots['test_class_variables_are_skipped 1'] = '''
snapshots["test_class_variables_are_skipped 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -52,9 +51,9 @@
msg_type: z.string(),
}).strict();
export type RpcMessageType = z.infer<typeof RpcMessage>;
'''
"""

snapshots['test_generic_field_type_is_any_with_no_typevar_bounds 1'] = '''
snapshots["test_generic_field_type_is_any_with_no_typevar_bounds 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -66,9 +65,9 @@
address: z.any(),
}).strict();
export type UserType = z.infer<typeof User>;
'''
"""

snapshots['test_initializes_empty_dicts 1'] = '''
snapshots["test_initializes_empty_dicts 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -81,9 +80,9 @@
created_at: z.number().int().default(0),
}).strict();
export type ClassType = z.infer<typeof Class>;
'''
"""

snapshots['test_initializes_empty_lists 1'] = '''
snapshots["test_initializes_empty_lists 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -96,9 +95,9 @@
created_at: z.number().int().default(0),
}).strict();
export type ClassType = z.infer<typeof Class>;
'''
"""

snapshots['test_renames_models_based_on_given_rules 1'] = '''
snapshots["test_renames_models_based_on_given_rules 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -121,9 +120,9 @@
classes: z.array(BaseClass),
}).strict();
export type ModuleType = z.infer<typeof Module>;
'''
"""

snapshots['test_user_defined_types_inheriting_from_str 1'] = '''
snapshots["test_user_defined_types_inheriting_from_str 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -134,9 +133,9 @@
id: z.string(),
}).strict();
export type UserType = z.infer<typeof User>;
'''
"""

snapshots['test_with_pydantic_model_config 1'] = '''
snapshots["test_with_pydantic_model_config 1"] = """
/**
* NOTE: automatically generated by the pydantic2zod compiler.
*/
Expand All @@ -162,4 +161,4 @@
]),
}).strict();
export type ModelType = z.infer<typeof Model>;
'''
"""

0 comments on commit 3ddfca1

Please sign in to comment.