Commit Graph

72 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
983a9b8f94 Use Unpack where it's possible 2025-08-15 05:36:36 -04:00
d18f14c173 [commands] fix HelpCommand not carrying over checks
update command impl over creating new one
2024-05-29 23:24:28 -04:00
0871b34fc8 [commands] Revert on_error when cog is ejected for HelpCommand 2023-06-28 08:20:54 -04:00
94bf7d8644 [commands] Add displayed_name to commands.Parameter 2023-06-11 12:38:39 -04:00
8f3224b70b [commands] Change Paginator.pages to not prematurely close 2023-02-24 16:24:50 -05:00
95b6bd8782 Add coro tag to docstrings that were missing it 2022-10-02 17:52:18 -04:00
668196c14c [commands] Add description kwarg to parameters and show in default help 2022-08-15 12:18:23 -04:00
d707019348 Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores 2022-08-04 22:46:02 -04:00
c9f777c873 Fix type annotations to adhere to latest pyright release 2022-06-12 15:30:45 -04:00
6901907b69 [commands] Add seealso directive in functions referencing checks 2022-05-05 06:21:52 -04:00
d0667d08e3 [commands] Fix typing of check/check_any
This changes the type information of check decorators to return a
protocol representing that the decorator leaves the underlying object
unchanged while having a .predicate attribute.

resolves #7949
2022-05-02 18:54:49 -04:00
737ff5beaf Update Pyright to 1.1.237 2022-04-13 02:30:00 -04:00
55c5be78cf [commands] Implement commands.parameter 2022-04-04 18:01:21 -04:00
29668c51ae [commands] Revert back to older help command implementation
The newer implementation did not play nicely with spawned tasks and
accessing HelpCommand.context, which was a frequent pain point when
writing paginated help commands.
2022-03-31 02:46:42 -04:00
06c257760b Update types to use Awaitable where possible 2022-03-30 22:00:24 -04:00
5ffa3e85de Update comments after # type: ignore to be compatible with PEP 484 2022-03-27 22:26:34 -04:00
062f4d6f87 Change some methods to use positional-only marker
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-03-22 18:52:25 -04:00
eca4727593 [commands] Add missing and fix existing type annotations 2022-03-22 06:04:46 -04:00
46b3e036e2 [commands] Fix help error/invoke hooks not running 2022-03-22 06:02:52 -04:00
1b70fad5ec [commands] Fix exceptions in HelpCommand 2022-03-19 13:14:17 -04:00
fafc5b13f6 [commands] Rework help command to avoid a deepcopy on invoke 2022-03-19 06:34:19 -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
adb69e7157 Fix some spelling mistakes 2022-03-10 20:45:16 -05:00
13355f3712 Fix HelpCommand.invoked_with raising an error
This would happen if the context hasn't been set yet.
2022-03-06 23:02:01 -05:00
625c416f18 [commands] Fix command parameter handling in HelpCommand 2022-03-06 01:39:43 -05:00
88b520b5ab Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
dc19c6c7d5 Add positional-only arguments in more places 2022-02-19 20:28:01 -05:00
2d8f299b6b Use MISSING instead of None for HelpCommand.context
It's basically just late-init
2021-08-25 09:53:55 -04:00
f3cb197429 [commands][types] Type hint commands-ext 2021-08-19 19:51:26 -04:00
3864fb37a0 Fix various reference issues in documentation
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-05-06 07:51:07 -04:00
91c473db57 [commands] Fix _HelpCommandImpl.clean_params popitem 2021-04-23 02:24:09 -04:00
0c1c9284f6 Fix typo within HelpCommand.verify_checks documentation 2021-04-21 00:18:32 -04:00
ffea48f218 [commands] Remove HelpCommand.clean_prefix (#6736) 2021-04-15 21:28:08 -04:00
af5964358d [commands] Strip text to remove spaces before ellipsis 2021-04-11 15:19:45 -04:00
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
c4c2cbf6d2 [commands] Remove nullability from help command implementation
Fixes #5154
2021-03-28 18:51:58 -04:00
caa3b4e8f4 [commands] Include group args in command signature 2021-03-24 08:16:23 -04:00
01d8502c83 [commands] Added tribool behaviour to HelpCommand.verify_checks 2021-02-24 05:40:35 -05:00
b7c7200f4d [commands] Add linesep kwarg to Paginator 2021-01-17 00:15:36 -05:00
c72dbf28ba [commands] Fix Command duplicates in HelpCommand.get_bot_mapping 2021-01-16 05:36:08 -05:00
69bdc3a184 Change copyright year to present 2021-01-15 05:28:11 -05:00
93fa46713a Fix and add documentation 2020-09-23 03:19:35 -04:00
ad22fb295e [commands] implement HelpCommand.add/remove_check 2020-08-05 21:38:58 -04:00
b4b953bfc6 Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
79276da17e Escape backslashes in display name in clean_prefix 2020-05-07 02:30:24 -04:00
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
6cdda4a320 Patch clean_prefix for new text editor
The new editor seems to force mentions to have ! even without a nick.
2020-01-14 19:39:34 -05:00
e79ccf3f4c [commands] check if prefix is None in .pages 2019-12-17 00:12:42 -05:00