-
Notifications
You must be signed in to change notification settings - Fork 139
refactor(enums)!: performance and functional improvements #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Sharp-Eyes
wants to merge
54
commits into
DisnakeDev:master
Choose a base branch
from
Sharp-Eyes:enums
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 12 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
eada261
ILOVEENUMSILOVEENUMSILOVEENUMSILOVEENUMSILOVEENUMS
Sharp-Eyes f0a4819
feat: merge, update, appease angry pyright gods
Sharp-Eyes 17a83b4
fix: add missing types to enums where needed
Sharp-Eyes 3e7ee1a
chore: fix CI issues
Sharp-Eyes b06526e
fix(tests): move properties, change error type
Sharp-Eyes 94cf59a
fix: update stray enum to new syntax
Sharp-Eyes e60f8c9
chore: first pass at removing value for enum
onerandomusername e705a3d
docs: add docs to all `enums.py` enums
Sharp-Eyes 34b9c86
fix: fix tests by fixing invalid escape sequence
Sharp-Eyes 410cf00
docs: add docs to `commands.BucketType` enum
Sharp-Eyes b201d89
Merge branch 'master' into enums
Sharp-Eyes 03a5507
feat: merge and fix failing checks
Sharp-Eyes fce05ef
feat: unit tests, minor fixes
Sharp-Eyes af8b09c
Merge branch 'master' into enums
Sharp-Eyes 551886b
fix: tests
Sharp-Eyes bb8d001
fix: funny pyright funny fun fun i love pyright
Sharp-Eyes 7c0fd82
Revert "chore: first pass at removing value for enum"
Sharp-Eyes 7959bfa
chore: re-add missing param types and ignores
Sharp-Eyes dd147b0
chore: pyright bamboozle
Sharp-Eyes 4124bbd
Merge branch 'master' into enums
Sharp-Eyes 09c5a98
Merge branch 'master' into enums
Sharp-Eyes a4185f7
fix: readd missing __str__ dunder for Locales
onerandomusername 8120f81
Merge branch 'enums' of https://github.com/Chromosomologist/disnake i…
Sharp-Eyes 662e0bd
feat: optimize code and improve documentation
Sharp-Eyes f7564c2
chore: actually run pre-commit, whoops
Sharp-Eyes d46594a
Merge branch 'master' into enums
Sharp-Eyes e8f719e
feat: name/value speedups using setattr
Sharp-Eyes 057f09b
Merge branch 'enums' of https://github.com/Chromosomologist/disnake i…
Sharp-Eyes 0037617
fix: changelog filename I somehow managed to bean
Sharp-Eyes 3175778
fix: revert now unnecessary check
Sharp-Eyes aa1ffb0
Merge branch 'master' into enums
onerandomusername 2272fbc
feat: update enum inheritance
Sharp-Eyes b688696
Merge branch 'enums' of https://github.com/Chromosomologist/disnake i…
Sharp-Eyes ecabbec
fix: unfuck enums on python 3.8
Sharp-Eyes f8c0c07
feat: alias to existing member on value dupe
Sharp-Eyes 0bb04d1
fix(tests): unfuckywucky the dupe test
Sharp-Eyes e85694c
Merge branch 'master' into enums
Sharp-Eyes 726c826
chore(tests): use types.new_class instead of exec
Sharp-Eyes d192412
Merge branch 'master' into enums
onerandomusername 5929b46
fix: uncomment `__str__` dunder for locales
Sharp-Eyes 9fff055
feat: add handling for unknown values, add len
Sharp-Eyes 313bf25
Merge branch 'master' into enums
onerandomusername 0824971
fix: count enums like previous implementation
onerandomusername abfafc4
chore: undo docs changes for a separate PR
Sharp-Eyes d89c68d
Merge branch 'master' into enums
Sharp-Eyes d9930b1
feat: display value of unknown enum members
Sharp-Eyes b2e1e95
Merge branch 'master' into enums
Sharp-Eyes d8e927c
chore: re-add missing import, add license header
Sharp-Eyes 2cfc928
feat: actually use brain for once
Sharp-Eyes 4a3bd4a
Merge branch 'master' into enums
onerandomusername f818a76
fix(changelog): remove mention of reverted docs
Sharp-Eyes 606392a
docs: re-add certain docstrings
Sharp-Eyes 8ab78ef
Merge branch 'master' into enums
Sharp-Eyes 797f338
feat: initial test updates
Sharp-Eyes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Rework :class:`disnake.enums.Enum` internals. | ||
- Adds support for typed enums, removes support for untyped enums. | ||
- Small performance increase by skipping removing the need for ``.value``. | ||
- Closer to the vanilla python Enum api. | ||
- Adds in-code documentation for all existin enums. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.