Skip to content

Commit

Permalink
Fix DeprecationWarning: The 'warn' method is deprecated, use 'warning…
Browse files Browse the repository at this point in the history
…' instead (#99)
  • Loading branch information
hugovk authored Feb 9, 2023
1 parent 6deac99 commit 597ee06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinxext/opengraph/socialcards.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ def create_social_card(

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

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

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

0 comments on commit 597ee06

Please sign in to comment.