Skip to content

Commit

Permalink
Merge pull request #2337 from rcomer/deprecate-style
Browse files Browse the repository at this point in the history
MNT: deprecate the style module
  • Loading branch information
greglucas authored Mar 9, 2024
2 parents 0fd1de7 + 3bfe800 commit 46aec1e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/cartopy/mpl/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
import warnings


warnings.warn('The style module is deprecated and will be removed in a future release.',
DeprecationWarning, stacklevel=2)


# Define the matplotlib style aliases that cartopy can expand.
# Note: This should not contain the plural aliases
# (e.g. linewidths -> linewidth).
Expand Down
7 changes: 6 additions & 1 deletion lib/cartopy/tests/mpl/test_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
# This file is part of Cartopy and is released under the BSD 3-clause license.
# See LICENSE in the root of the repository for full licensing details.

import warnings

import pytest

from cartopy.mpl import style

with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
from cartopy.mpl import style


@pytest.mark.parametrize(
Expand Down

0 comments on commit 46aec1e

Please sign in to comment.