Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 dump(docs): remove unused docs and config #41

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .readthedocs.yaml

This file was deleted.

34 changes: 23 additions & 11 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
"""Doctest configuration."""

from collections.abc import Callable, Iterable, Sequence
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE

from sybil import Sybil
from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser, SkipParser

pytest_collect_file = Sybil(
parsers=[
DocTestParser(optionflags=NORMALIZE_WHITESPACE | ELLIPSIS),
PythonCodeBlockParser(),
SkipParser(),
],
patterns=["*.rst", "*.py"],
).pytest()
from sybil import Document, Region, Sybil
from sybil.parsers.myst import (
DocTestDirectiveParser as MarkdownDocTestDirectiveParser,
PythonCodeBlockParser as MarkdownPythonCodeBlockParser,
SkipParser as MarkdownSkipParser,
)
from sybil.parsers.rest import DocTestParser as ReSTDocTestParser

optionflags = ELLIPSIS | NORMALIZE_WHITESPACE

parsers: Sequence[Callable[[Document], Iterable[Region]]] = [
MarkdownDocTestDirectiveParser(optionflags=optionflags),
MarkdownPythonCodeBlockParser(doctest_optionflags=optionflags),
MarkdownSkipParser(),
]

docs = Sybil(parsers=parsers, patterns=["*.md"])
python = Sybil(
parsers=[ReSTDocTestParser(optionflags=optionflags), *parsers], patterns=["*.py"]
)

pytest_collect_file = (docs + python).pytest()
45 changes: 0 additions & 45 deletions docs/conf.py

This file was deleted.

17 changes: 0 additions & 17 deletions docs/index.md

This file was deleted.

Loading