Skip to content

Commit cc1214e

Browse files
committed
Address PR review
1 parent ef87743 commit cc1214e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

markdown_it/renderer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class Renderer
66
rules if you create plugin and adds new token types.
77
"""
88
import inspect
9-
import sys
109
from typing import (
1110
ClassVar,
1211
MutableMapping,
@@ -18,10 +17,10 @@ class Renderer
1817
from .token import Token
1918
from .utils import OptionsDict
2019

21-
if sys.version_info < (3, 8):
22-
from typing_extensions import Protocol
23-
else:
20+
try:
2421
from typing import Protocol
22+
except ImportError: # Python <3.8 doesn't have `Protocol` in the stdlib
23+
from typing_extensions import Protocol # type: ignore[misc]
2524

2625

2726
class RendererProtocol(Protocol):

0 commit comments

Comments
 (0)