Skip to content

Commit

Permalink
py(deps,types): Update Directive annotations for types-docutils
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Mar 10, 2024
1 parent bd4f0a8 commit 537a5b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions src/doctest_docutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
blankline_re = re.compile(r"^\s*<BLANKLINE>", re.MULTILINE)
doctestopt_re = re.compile(r"#\s*doctest:.+$", re.MULTILINE)

OptionSpec = t.Dict[str, t.Callable[[str], t.Any]]


def is_allowed_version(version: str, spec: str) -> bool:
"""Check `spec` satisfies `version` or not.
Expand Down Expand Up @@ -142,19 +140,19 @@ def run(self) -> t.List[Node]:
class TestsetupDirective(TestDirective):
"""Test setup directive."""

option_spec: t.ClassVar[OptionSpec] = {"skipif": directives.unchanged_required} # type:ignore
option_spec = {"skipif": directives.unchanged_required}


class TestcleanupDirective(TestDirective):
"""Test cleanup directive."""

option_spec: t.ClassVar[OptionSpec] = {"skipif": directives.unchanged_required} # type:ignore
option_spec = {"skipif": directives.unchanged_required}


class DoctestDirective(TestDirective):
"""Doctest directive."""

option_spec: t.ClassVar[OptionSpec] = { # type:ignore
option_spec = {
"no-trim-doctest-flags": directives.flag,
"options": directives.unchanged,
"pyversion": directives.unchanged_required,
Expand Down

0 comments on commit 537a5b5

Please sign in to comment.