Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: deprecate the style module #2337

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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