Skip to content

Commit ebb5f46

Browse files
committed
refactor: linter fixes
1 parent 8f3a317 commit ebb5f46

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pygments_djc/lexers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
from typing import List, Tuple
2+
13
from pygments.lexer import Lexer, bygroups, using
24
from pygments.lexers.css import CssLexer
35
from pygments.lexers.javascript import JavascriptLexer
46
from pygments.lexers.python import PythonLexer
57
from pygments.lexers.templates import HtmlDjangoLexer
6-
from pygments.token import Name, Text, Operator, String, Punctuation
8+
from pygments.token import Name, Operator, Punctuation, String, Text
79

810

911
# Since this Lexer will be used only in documentation, it's a naive implementation
@@ -32,7 +34,7 @@
3234
# ```
3335
#
3436
# But our implementation still highlights the latter.
35-
def _gen_code_block_capture_rule(var_name: str, next_state: str) -> tuple[str, str, str]:
37+
def _gen_code_block_capture_rule(var_name: str, next_state: str) -> Tuple[str, str, str]:
3638
# In Pygments, capture rules are defined as a tuple of 3 elements:
3739
# - The pattern to capture
3840
# - The token to highlight
@@ -65,7 +67,7 @@ def _gen_code_block_capture_rule(var_name: str, next_state: str) -> tuple[str, s
6567

6668

6769
# This generates capture rules for when we are already inside the code block
68-
def _gen_code_block_rules(lexer: Lexer) -> list[tuple[str, str, str]]:
70+
def _gen_code_block_rules(lexer: Lexer) -> List[Tuple[str, str, str]]:
6971
return [
7072
# We're inside the code block and we came across a """ or ''',
7173
# so the code block ends.

0 commit comments

Comments
 (0)