Skip to content

Commit

Permalink
Merge pull request #780 from adamtheturtle/fewer-isinstance
Browse files Browse the repository at this point in the history
Remove some isinstance assertions which are no longer necessary
  • Loading branch information
adamtheturtle committed May 10, 2024
2 parents 7a645c8 + b479294 commit 1e95104
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/sphinx_substitution_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def __call__( # pylint: disable=dangerous-default-value
"""
inliner_document = inliner.document
for name, value in inliner_document.substitution_defs.items():
assert isinstance(name, str)
replacement = value.astext()
text = text.replace(f"|{name}|", replacement)
rawtext = text.replace(f"|{name}|", replacement)
Expand Down Expand Up @@ -141,7 +140,6 @@ def process_link(
document = self.inliner.document
assert isinstance(document, docutils.nodes.document)
for name, value in document.substitution_defs.items():
assert isinstance(name, str)
replacement = value.astext()
title = title.replace(f"|{name}|", replacement)
target = target.replace(f"|{name}|", replacement)
Expand Down

0 comments on commit 1e95104

Please sign in to comment.