Skip to content

Refactor/options#3126

Draft
Soheab wants to merge 8 commits intoPycord-Development:masterfrom
Soheab:refactor/options
Draft

Refactor/options#3126
Soheab wants to merge 8 commits intoPycord-Development:masterfrom
Soheab:refactor/options

Conversation

@Soheab
Copy link
Contributor

@Soheab Soheab commented Feb 26, 2026

Summary

Overrides #2919

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@pycord-app
Copy link

pycord-app bot commented Feb 26, 2026

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3126/head:pr-3126
git checkout pr-3126

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3126/head

@Paillat-dev

This comment has been minimized.

@Soheab

This comment has been minimized.

@Lulalaby

This comment has been minimized.

Comment on lines +44 to +47
if sys.version_info >= (3, 12):
from typing import TypeAliasType
else:
from typing_extensions import TypeAliasType
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO you should always import from typing_extension to avoid potentially differing behavior, also haven't seen this kind of version check myself yet in the lib so idk

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here specifically I don't think it works, bc we do instance checks on it. Could you confirm that @Soheab ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the current code fwiw, new code is in the options.py module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing choices= to an option and typing it as Literal fails Parse the args better

4 participants