Skip to content

Commit

Permalink
chore(mypy): Ignore Directive annotations for now
Browse files Browse the repository at this point in the history
src/doctest_docutils.py:145: error: Cannot override instance variable (previously declared on base class "Directive") with class variable  [misc]
src/doctest_docutils.py:151: error: Cannot override instance variable (previously declared on base class "Directive") with class variable  [misc]
src/doctest_docutils.py:157: error: Cannot override instance variable (previously declared on base class "Directive") with class variable  [misc]
Found 3 errors in 1 file (checked 11 source files)

See also: python/typeshed#11550
  • Loading branch information
tony committed Mar 9, 2024
1 parent 7816e4e commit b56de48
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/doctest_docutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,19 @@ def run(self) -> t.List[Node]:
class TestsetupDirective(TestDirective):
"""Test setup directive."""

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


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

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


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

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

0 comments on commit b56de48

Please sign in to comment.