Skip to content

submodule with only base classes, mainly to help with typing #583

Open
@kushalkolar

Description

@kushalkolar

I think it might be useful to have a fastplotlib submodule with all the base classes that are used throughout the library. This would include:

  • Graphic
  • PlotArea
  • Subplot
  • Figure
  • Legend
  • UI base classes

The reason this could be useful is to have a central location of all bases so that they can be used everywhere for type annotations without circular imports.

I think this is a reasonable idea for a library like ours. For example, in pyqtgraph you can do GraphicsItem.getViewBox() which returns a ViewBox (but there is no type annotation). And ViewBox itself inherits from GraphicsItem. We don't have circumstances like this, but it would be useful to type annotate Subplot.parent is Figure, and simultaneously that Figure contains Subplots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy