diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b03d6608..63cb61dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: run: | find -name '*.md' | xargs .github/lint-markdown.sh flake8 - mypy pdoc + mypy -p pdoc time coverage run -m unittest -v pdoc.test PDOC_TEST_PANDOC=1 time catchsegv python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc bash <(curl -s https://codecov.io/bash) diff --git a/pdoc/html_helpers.py b/pdoc/html_helpers.py index 39d6d9b9..d552cb9a 100644 --- a/pdoc/html_helpers.py +++ b/pdoc/html_helpers.py @@ -84,10 +84,10 @@ def glimpse(text: str, max_length=153, *, paragraph=True, ], extension_configs={ "markdown.extensions.smarty": dict( - smart_dashes=True, # type: ignore[dict-item] - smart_ellipses=True, # type: ignore[dict-item] - smart_quotes=False, # type: ignore[dict-item] - smart_angled_quotes=False, # type: ignore[dict-item] + smart_dashes=True, + smart_ellipses=True, + smart_quotes=False, + smart_angled_quotes=False, ), }, ) @@ -417,10 +417,10 @@ def to_html(text: str, *, example template. """ # Optionally register our math syntax processor - if not latex_math and _MathPattern.NAME in _md.inlinePatterns: # type: ignore - _md.inlinePatterns.deregister(_MathPattern.NAME) # type: ignore - elif latex_math and _MathPattern.NAME not in _md.inlinePatterns: # type: ignore - _md.inlinePatterns.register(_MathPattern(_MathPattern.PATTERN), # type: ignore + if not latex_math and _MathPattern.NAME in _md.inlinePatterns: + _md.inlinePatterns.deregister(_MathPattern.NAME) + elif latex_math and _MathPattern.NAME not in _md.inlinePatterns: + _md.inlinePatterns.register(_MathPattern(_MathPattern.PATTERN), _MathPattern.NAME, _MathPattern.PRIORITY)