diff options
Diffstat (limited to 'sphinx/domains/math.py')
-rw-r--r-- | sphinx/domains/math.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/domains/math.py b/sphinx/domains/math.py index 88b6e4eb8..e77bd0ed7 100644 --- a/sphinx/domains/math.py +++ b/sphinx/domains/math.py @@ -142,7 +142,7 @@ class MathDomain(Domain): def add_equation(self, env: BuildEnvironment, docname: str, labelid: str) -> int: warnings.warn('MathDomain.add_equation() is deprecated.', - RemovedInSphinx40Warning) + RemovedInSphinx40Warning, stacklevel=2) if labelid in self.equations: path = env.doc2path(self.equations[labelid][0]) msg = __('duplicate label of equation %s, other instance in %s') % (labelid, path) @@ -154,7 +154,7 @@ class MathDomain(Domain): def get_next_equation_number(self, docname: str) -> int: warnings.warn('MathDomain.get_next_equation_number() is deprecated.', - RemovedInSphinx40Warning) + RemovedInSphinx40Warning, stacklevel=2) targets = [eq for eq in self.equations.values() if eq[0] == docname] return len(targets) + 1 |