Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 30, 2024
1 parent 865b513 commit d0915ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sphinx/highlighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if tuple(map(int, pygments.__version__.split('.')))[:2] < (2, 18):
from pygments.formatter import Formatter

Formatter.__class_getitem__ = lambda cls, name: cls
Formatter.__class_getitem__ = lambda cls, name: cls # type: ignore[attr-defined]

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_highlighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

if tuple(map(int, pygments.__version__.split('.')))[:2] < (2, 18):
from pygments.formatter import Formatter
Formatter.__class_getitem__ = lambda cls, name: cls
Formatter.__class_getitem__ = lambda cls, name: cls # type: ignore[attr-defined]


class MyLexer(RegexLexer):
Expand Down

0 comments on commit d0915ab

Please sign in to comment.