Skip to content

Followup on Generic Typing of Layers and type of layer.mode #6005

@Carreau

Description

@Carreau

🧰 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskTasks for contributors and maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions