Skip to content

Conversation

sbrunner
Copy link
Owner

fix #634

@sbrunner sbrunner requested a review from Copilot June 27, 2025 11:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request addresses issue #634 by modifying the matplotlib import strategy to make matplotlib an optional dependency. The changes remove top‐level runtime imports of matplotlib modules, move one import into the TYPE_CHECKING block, and update a type annotation to use a forward reference for optional dependency handling.

  • Removed runtime imports of matplotlib.axes and matplotlib.projections.polar.
  • Added a TYPE_CHECKING-only import for matplotlib.projections.polar.
  • Updated a type annotation for PolarAxes to a string literal for lazy evaluation.
Comments suppressed due to low confidence (1)

deskew/init.py:15

  • Consider adding an inline comment here to clarify that this import is used exclusively for type checking, which supports the optional dependency handling strategy.
    import matplotlib.projections.polar

@sbrunner sbrunner merged commit 1be2286 into master Jun 27, 2025
18 checks passed
@sbrunner sbrunner deleted the matplotlib branch June 27, 2025 11:21
@geo-ghci-int geo-ghci-int bot added this to the 1.5.3 milestone Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken dependencies in 1.5.2 (matplotlib)
1 participant