Skip to content

Commit

Permalink
Add deprecation warnings for 2D classes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsonTran committed Apr 20, 2024
1 parent d2f66fe commit 86ce4ec
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/matplotlib/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,12 @@ def inverted(self):
return self._inverted


@_api.deprecated("3.9", alternative="AffineImmutable")
class Affine2DBase(AffineImmutable):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

Check warning on line 1930 in lib/matplotlib/transforms.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/transforms.py#L1930

Added line #L1930 was not covered by tests


def _affine_factory(mtx, dims, *args, **kwargs):
if dims == 2:
return Affine2D(mtx, *args, **kwargs)
Expand Down Expand Up @@ -2396,6 +2402,12 @@ def get_matrix(self):
return self._mtx


@_api.deprecated("3.9", alternative="BlendedAffine")
class BlendedAffine2D(BlendedAffine):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

Check warning on line 2408 in lib/matplotlib/transforms.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/transforms.py#L2408

Added line #L2408 was not covered by tests


def blended_transform_factory(*args):
"""
Create a new "blended" transform using *x_transform* to transform
Expand Down Expand Up @@ -2567,6 +2579,12 @@ def get_matrix(self):
return self._mtx


@_api.deprecated("3.9", alternative="CompositeAffine")
class CompositeAffine2D(CompositeAffine):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

Check warning on line 2585 in lib/matplotlib/transforms.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/transforms.py#L2585

Added line #L2585 was not covered by tests


def composite_transform_factory(a, b):
"""
Create a new composite transform that is the result of applying
Expand Down

0 comments on commit 86ce4ec

Please sign in to comment.