🧰 Task
Currently, #5869 #5852 #5871 have to type layer.mode as str, because fo some complexity.
- Layer base need to refer the a "self.mode",
- Each subclass has
self.mode be a different type.
- The base class need to handle common logic.
- The runtime value of the
Mode type is held in _modeclass
But all those does not help with type checking.
[I believe] we can solve that with generics, but this seem a bit hard to do that in the above mentioned PRs, so opening an issue to track this.
🧰 Task
Currently, #5869 #5852 #5871 have to type
layer.modeas str, because fo some complexity.self.modebe a different type.Modetype is held in_modeclassBut all those does not help with type checking.
[I believe] we can solve that with generics, but this seem a bit hard to do that in the above mentioned PRs, so opening an issue to track this.