Skip to content

Commit

Permalink
Merge pull request #71 from bsipocz/BUG_remove_warning
Browse files Browse the repository at this point in the history
BUG: cleanup unnecessary warning
  • Loading branch information
pllim authored Oct 10, 2024
2 parents 54421f5 + fa56b7b commit d0e263c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions sphinx_astropy/conf/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,11 @@ def check_sphinx_version(expected_version):
# AttributeError is checked here in case matplotlib is installed but
# Sphinx isn't. Note that this module is imported by the config file
# generator, even if we're not building the docs.
# We don't need to raise a warning or exception here as there are packages
# that don't use the directive, and those who try to use it without mpl being
# installed will get a nice "Unknown directive type" error at usage.
except (ImportError, AttributeError):
warnings.warn(
"matplotlib's plot_directive could not be imported. " +
"Inline plots will not be included in the output")
pass

# Don't show summaries of the members in each class along with the
# class' docstring
Expand Down
8 changes: 4 additions & 4 deletions sphinx_astropy/conf/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# serve to show the default.

import os
import warnings
from collections import ChainMap
from os import path

Expand Down Expand Up @@ -208,10 +207,11 @@
# AttributeError is checked here in case matplotlib is installed but
# Sphinx isn't. Note that this module is imported by the config file
# generator, even if we're not building the docs.
# We don't need to raise a warning or exception here as there are packages
# that don't use the directive, and those who try to use it without mpl being
# installed will get a nice "Unknown directive type" error at usage.
except (ImportError, AttributeError):
warnings.warn(
"matplotlib's plot_directive could not be imported. " +
"Inline plots will not be included in the output")
pass

# Don't show summaries of the members in each class along with the
# class' docstring
Expand Down

0 comments on commit d0e263c

Please sign in to comment.