Skip to content

Commit d0915ab

Browse files
committed
Fix mypy
1 parent 865b513 commit d0915ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sphinx/highlighting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
if tuple(map(int, pygments.__version__.split('.')))[:2] < (2, 18):
3535
from pygments.formatter import Formatter
3636

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

3939
logger = logging.getLogger(__name__)
4040

tests/test_highlighting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

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

1616

1717
class MyLexer(RegexLexer):

0 commit comments

Comments
 (0)