Skip to content

Move providers from _providers.py to _qproviders.py #6585

@lucyleeow

Description

@lucyleeow

🧰 Task

All the providers in napari/_app_model/injection/_providers.py depend on Qt. _provide_viewer uses _QtMainWindow.current_viewer() which returns None on import error. The other 2 providers both rely on _provide_viewer.

see: #4991 (comment)

All 3 providers should be moved to napari/_qt/_qapp_model/injection/_qproviders.py

Note this depends on #4991 being merged first.

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