feat: implement positional flags#2443
Conversation
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
|
@Vioshim please work on dorus comment and resolve conflcts |
Signed-off-by: Lala Sabathil <lala@pycord.dev>
The typing import in flags.py has been updated to include the Optional module. This change ensures that the __commands_flag_positional__ attribute can accept a value of None.
Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
|
Needs testing + doesn't work with python 3.11+ |
|
Merge conflicts |
|
@Lulalaby I think that OP is gone but I can fix these in a new pr. Lmk if ok |
|
Sure go for it if you still think it's a good addition |
|
My apologies, felt lost on how to be able to contribute in the project once i saw the things about merging conflicts or the documentation changes, so ended up lost on how to correct it alongside irl stuff, so my apologies for the lack of response |
|
@Vioshim no worries. Do you still want to work on this ? If lmk and I'll handle the merge conflicts and the rest |
|
That'd be quite appreciated, thank you!! |
|
No worries and thank you for your contribution ! |
Signed-off-by: Paillat <paillat@pycord.dev>
|
@Lumabots Can I get some testing from you ? Specifically on python 3.11 and higher ? |
Signed-off-by: Paillat <jeremiecotti@ik.me>
Yep doing that tomorrow evening |
b55c125 to
82659b2
Compare
DA-344
left a comment
There was a problem hiding this comment.
lgtm code wise, if this is tested and works then should be ready to merge
Lumabots
left a comment
There was a problem hiding this comment.
lgtm, tested with py11, 12, 13
|
Damn one year old already |
* Implements positional flags * style(pre-commit): auto fixes from pre-commit.com hooks * Documentation for positional argument in commands.Flag * style(pre-commit): auto fixes from pre-commit.com hooks * Apply suggestions from code review Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Lala Sabathil <aiko@aitsys.dev> * chore: Update typing import in flags.py The typing import in flags.py has been updated to include the Optional module. This change ensures that the __commands_flag_positional__ attribute can accept a value of None. * style(pre-commit): auto fixes from pre-commit.com hooks * style(pre-commit): auto fixes from pre-commit.com hooks * Apply suggestion from @Paillat-dev Signed-off-by: Paillat <jeremiecotti@ik.me> --------- Signed-off-by: Lala Sabathil <aiko@aitsys.dev> Signed-off-by: Lala Sabathil <lala@pycord.dev> Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Paillat <paillat@pycord.dev> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <aiko@aitsys.dev> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Co-authored-by: Lala Sabathil <lala@pycord.dev> Co-authored-by: Paillat <paillat@pycord.dev> Co-authored-by: Paillat <jeremiecotti@ik.me> (cherry picked from commit 9f265b0)
Summary
This allows FlagConverters to be used after the first text expression, for example
Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.