forked from canonical/operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use StatusBase.__init_subclass__ instead of decorator to avoid o…
…bscuring subclass type (canonical#1383) Previously, StatusBase.register obscured the type of decorated classes. The classes would all end up typed as Type[StatusBase], and when instantiated they would be typed as StatusBase instead of their actual class (see canonical#1380). Instead we now register subclasses automatically in __init_subclass__, no longer using StatusBase.register as a decorator, which avoids obscuring the type of subclasses.
- Loading branch information
1 parent
454e197
commit 20c9623
Showing
3 changed files
with
13 additions
and
9 deletions.
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
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