Commit a69e354
fix: improve handling of types in option input_type validation (Pycord-Development#2893)
* fix: improve handling of Union and tuple types in option input_type validation
* fix: Option type handling for multiple Literals
Updates Option type resolution to return a Union of Literals when all filtered types are Literal, ensuring correct type annotation for command options.
---------
Co-authored-by: Lala Sabathil <[email protected]>
(cherry picked from commit d0937be)1 parent 5051530 commit a69e354
1 file changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
345 | 348 | | |
346 | 349 | | |
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
350 | | - | |
351 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
352 | 356 | | |
353 | 357 | | |
354 | 358 | | |
| |||
0 commit comments