Commit Graph
33 Commits
Author SHA1 Message Date
Rapptz c342db8534 [commands] Fix flag annotations in 3.14 using annotationlib
Fix #10349
2025-11-12 20:22:45 -05:00
Rapptz 6d19bc763c [commands] Fix flag annotations not working under 3.14 2025-10-14 17:16:43 -04:00
Rapptz 44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
Rapptz 8953938a53 Update Pyright to v1.1.394 2025-02-18 03:29:09 -05:00
Vioshim 71358b8dce [commands] Add support for positional flag parameters 2024-05-05 01:48:02 -04:00
Josh 4e03b170ef Update pyright version 2024-02-20 13:36:02 -05:00
Josh 630b2a1e55 Update pyright version 2023-07-01 18:26:27 -04:00
Rapptz da317ad84b [commands] Respect ignore_extra for FlagConverter kw-only parameters 2022-11-29 18:09:53 -05:00
Omkaar c30a2f3ca0 Refactor certain f-strings and literals 2022-10-02 17:50:56 -04:00
Rapptz 1c7747fe9d Fix nested Annotated calls not resolving 2022-08-17 10:41:57 -04:00
Rapptz 60079aee1b [commands] Fix Annotated not working with FlagConverter 2022-08-04 10:44:03 -04:00
WayoshiandDanny 38ba3b8d23 [commands] fix case_insensitive bug in parse_flags
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-05-17 16:41:02 -04:00
z03h 9450a8e972 [commands] Change FlagConverter to always raise BadFlagArgument 2022-05-16 15:31:18 -04:00
Rapptz 15ceca1e63 [commands] Add support for FlagConverter in hybrid commands
This works by unpacking and repacking the flag arguments in a flag.
If an unsupported type annotation is found then it will error at
definition time.
2022-05-11 03:15:57 -04:00
z03h aee657bca5 [commands] Add converter kwarg to flag 2022-04-09 02:10:32 -04:00
James Hilton-Balfe 55c5be78cf [commands] Implement commands.parameter 2022-04-04 18:01:21 -04:00
Rapptz 1192d842e1 Fix some type checker errors and remove some type ignores
Caught from an upgraded Pyright
2022-03-16 01:46:58 -04:00
5aa696ccfa Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
Josh 147948af9b Use typing.Self throughout library 2022-03-01 07:53:24 -05:00
Josh a315786869 Handle type-errors in upcoming pyright release 2022-02-22 08:51:11 -05:00
Rapptz 1a8d63d54f [commands] Remove Flag related delimiter and prefix error 2021-04-30 03:29:44 -04:00
Nadir Chowdhury c786a85a9b Add utils.MISSING 2021-04-29 01:58:36 -04:00
Rapptz 9f3551926a Split annotation resolution to discord.utils 2021-04-27 05:48:27 -04:00
Josh 4fbc78ba81 [commands] Add support for typing.Union to Flags 2021-04-25 04:35:19 -04:00
Rapptz fb024546ff [commands] Fix Literal converter not working within flags 2021-04-24 08:55:55 -04:00
Rapptz 1c312a158a [commands] Add FlagConverter.__iter__ 2021-04-24 08:53:36 -04:00
Rapptz 8e9860077d [commands] Fix flag detection code in get_flags 2021-04-23 02:23:07 -04:00
Josh 8457f70477 [commands] Set constructible FlagConverter flags to not be required 2021-04-21 23:21:02 -04:00
Josh cfe93f19b1 [commands] Allow FlagCommand subclasses to inherit options 2021-04-21 07:16:23 -04:00
Josh 42463bae67 [commands] Add support for aliasing to FlagConverter 2021-04-21 00:31:01 -04:00
Rapptz 6065329c0e [commands] Avoid creating unnecessary flag mapping copies 2021-04-20 08:02:40 -04:00
Rapptz 15bfdf66b2 [commands] Default construct flags if they're not passed as parameters
This only applies if and only if the flag can be default constructible.
Ergo, all the flags are optional or not required.
2021-04-20 08:00:47 -04:00
Rapptz ddb71e2aed [commands] Initial support for FlagConverter
The name is currently pending and there's no command.signature hook
for it yet since this requires bikeshedding.
2021-04-19 10:25:08 -04:00