Commit 09efd72
Doug Borg
fix: accept Optional[str] in _convert_primitive_type
The _convert_primitive_type function already handles None internally (line 186),
so the type hint should accept Optional[str] not just str.
This fixes the ty type checker error:
error[invalid-argument-type]: Argument to function _convert_primitive_type is incorrect
Expected `str`, found `str | None`
✅ Verified with: poetry run ty check src/
✅ All tests pass1 parent de4714c commit 09efd72
File tree
1 file changed
+2
-2
lines changed- src/openapi_python_generator/language_converters/python
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
0 commit comments