-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed type inference logic that infers the type of the
value
attr…
…ibute in an enum. If the enum class has a custom metaclass (one that is not part of the stdlib), pyright now assumes that the custom metaclass may perform some runtime magic that modifies the `value`. This occurs, for example, in django's `TextChoices` class. This addresses #5092.
- Loading branch information
1 parent
afce8cc
commit 7888d1c
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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