Commit daa85a9
feat: Default to union operator for type hints (#2703)
* feat: Replace Optional with Union type hints for improved type clarity
* docs: update CLI reference documentation
🤖 Generated by GitHub Actions
* feat: Update type hints to use Optional and Union for better compatibility
* docs: update CLI reference documentation
🤖 Generated by GitHub Actions
* feat: Enhance type hinting by replacing Optional with Union and adding support for native union types
* docs: update CLI reference documentation
🤖 Generated by GitHub Actions
* feat: Enhance type hinting by replacing Optional with Union and adding support for native union types
* feat: Refactor type hint handling to improve union type hint generation
* feat: Update type hints to use native union types and improve readability
* docs: update CLI reference documentation
🤖 Generated by GitHub Actions
* feat: Update type hints to use native union types across multiple files
* docs: update CLI reference documentation
🤖 Generated by GitHub Actions
* feat: Add LEGACY_BLACK_SKIP decorator to JSON Schema test functions
* feat: Add LEGACY_BLACK_SKIP decorator to JSON Schema test functions
* feat: Apply LEGACY_BLACK_SKIP decorator to relevant test functions
* feat: Apply LEGACY_BLACK_SKIP decorator to relevant test functions
* feat: Add coverage pragma to type hint method return
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 1b5d3fb commit daa85a9
File tree
576 files changed
+4272
-5144
lines changed- docs/cli-reference
- src/datamodel_code_generator
- model
- parser
- tests
- data/expected
- main_kr
- custom_file_header
- encoding
- formatters
- ignore_pyproject
- include_path_parameters
- input_output
- main_allof_with_description_only
- main_base_class
- main_custom_template_dir
- main_modular
- foo
- woo
- main_no_file
- main_use_field_description
- main_use_inline_field_description
- main_use_schema_description
- main
- no_alias
- pyproject_profile
- pyproject
- target_python_version
- url_with_headers
- use_decimal_for_multiple_of
- use_non_positive_negative
- use_pendulum
- main
- graphql
- jsonschema
- alias_import_alias
- all_of_any_of
- all_of_one_of
- discriminator_with_external_references_folder_msgspec/inner_folder
- discriminator_with_external_references_folder/inner_folder
- ids
- modular_default_enum_member
- module_split_single
- multiple_files_json_pointer
- multiple_files
- nested_deep
- empty_parent/nested
- nested
- nested_directory
- definitions
- relative/animal/pet
- nested_skip/a/b/c
- require_referenced_field_msgspec
- require_referenced_field_naivedatetime
- require_referenced_field_pydantic_v2
- require_referenced_field
- reuse_scope_tree_branch
- reuse_scope_tree_dataclass_frozen
- reuse_scope_tree_dataclass
- reuse_scope_tree_enum
- reuse_scope_tree_multi
- reuse_scope_tree_no_conflict_dir
- reuse_scope_tree_no_dup
- reuse_scope_tree_self_ref
- reuse_scope_tree
- root_one_of
- treat_dot_as_module_single/model
- treat_dot_as_module/complex/directory
- api/path
- treat_dot_not_as_module/complex.directory
- json
- openapi
- all_exports_no_child/parent
- child
- all_exports_with_local_models/pkg
- body_and_parameters
- circular_imports_acyclic
- circular_imports_class_conflict
- circular_imports_different_prefixes
- circular_imports_mixed_prefixes
- circular_imports_small_cycle
- circular_imports_stripe_like
- circular_imports_with_inheritance
- default_object
- discriminator
- dot_notation_deep_inheritance/v0
- mammal
- dot_notation_inheritance/v0
- enum_models
- external_relative_ref/module_openapi
- modules
- modular_all_exports_children_docstring
- foo
- woo
- modular_all_exports_children
- foo
- woo
- modular_all_exports_recursive_full_prefix
- foo
- woo
- modular_all_exports_recursive
- foo
- woo
- modular_custom_class_name
- foo
- woo
- modular_reuse_model
- foo
- woo
- modular_typed_dict
- modular
- foo
- woo
- module_class_name_collision_deep/A
- module_class_name_collision
- msgspec_default_object
- namespace_subns_ref/ns
- nested_package_enum_default/io/example/api
- pattern
- pydantic_v2_default_object
- use_generic_container_types_standard_collections
- foo
- woo
- use_generic_container_types
- foo
- woo
- use_standard_collections
- foo
- woo
- parser/graphql
- main
- graphql
- jsonschema
- openapi
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
576 files changed
+4272
-5144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
71 | | - | |
72 | | - | |
| 69 | + | |
| 70 | + | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | | - | |
126 | | - | |
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
130 | 126 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
134 | 130 | | |
135 | 131 | | |
136 | 132 | | |
| |||
236 | 232 | | |
237 | 233 | | |
238 | 234 | | |
239 | | - | |
240 | | - | |
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
244 | 238 | | |
245 | | - | |
246 | | - | |
247 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
248 | 242 | | |
249 | 243 | | |
250 | 244 | | |
| |||
298 | 292 | | |
299 | 293 | | |
300 | 294 | | |
301 | | - | |
302 | | - | |
303 | 295 | | |
304 | 296 | | |
305 | 297 | | |
306 | 298 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
310 | 302 | | |
311 | 303 | | |
312 | 304 | | |
| |||
0 commit comments