Commit Graph
22 Commits
Author SHA1 Message Date
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