-
-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* layout: Fix __add__ and __radd__ implementation * Add layout.Layoutable as a mirror of overlay.Overlayable * Remove a good deal of duplicated code * Remove broken calls to super().__radd__ where the super class does not implement __radd__ * Return NotImplemented when Layout([x,y]) raises NotImplementedError. This allows correct interoperability with external classes that could themselves define __radd__ as stated by: https://docs.python.org/3/library/constants.html#NotImplemented Fixes #3577 * overlay: deduplicate and fix __mul__ * Return NotImplemented when appropriate * Deduplicate code between 2 non-trivial and almost identical implementations of __mul__ * Fix non-inheritance-friendly type checking with a local import to avoid cyclic dependency Fixes #3577
- Loading branch information
1 parent
82577ba
commit fbd7a29
Showing
4 changed files
with
54 additions
and
99 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
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