Skip to content

Commit 597ee06

Browse files
authored
Fix DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead (#99)
1 parent 6deac99 commit 597ee06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinxext/opengraph/socialcards.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ def create_social_card(
100100

101101
# If image is an SVG replace it with None
102102
if impath.suffix.lower() == ".svg":
103-
LOGGER.warn(f"[Social card] {img} cannot be an SVG image, skipping...")
103+
LOGGER.warning(f"[Social card] %s cannot be an SVG image, skipping...", img)
104104
kwargs_fig[img] = None
105105

106106
# If image doesn't exist, throw a warning and replace with none
107107
if not impath.exists():
108-
LOGGER.warn(f"[Social card]: {img} file doesn't exist, skipping...")
108+
LOGGER.warning(f"[Social card]: %s file doesn't exist, skipping...", img)
109109
kwargs_fig[img] = None
110110

111111
# These are passed directly from the user configuration to our plotting function

0 commit comments

Comments
 (0)