Skip to content

Commit f545dd9

Browse files
committed
Fix new mypy errors
1 parent e5e5746 commit f545dd9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

markdown_it/rules_block/blockquote.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Block quotes
22
import logging
3+
from typing import Optional
34

45
from .state_block import StateBlock
56
from ..common.utils import isSpace
@@ -39,7 +40,7 @@ def blockquote(state: StateBlock, startLine: int, endLine: int, silent: bool):
3940
)
4041

4142
try:
42-
second_char_code = state.srcCharCode[pos]
43+
second_char_code: Optional[int] = state.srcCharCode[pos]
4344
except IndexError:
4445
second_char_code = None
4546

markdown_it/rules_block/heading.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Atex heading (#, ##, ...) """
22
import logging
3+
from typing import Optional
34

45
from .state_block import StateBlock
56
from ..common.utils import isSpace
@@ -18,7 +19,7 @@ def heading(state: StateBlock, startLine: int, endLine: int, silent: bool):
1819
if state.sCount[startLine] - state.blkIndent >= 4:
1920
return False
2021

21-
ch = state.srcCharCode[pos]
22+
ch: Optional[int] = state.srcCharCode[pos]
2223

2324
# /* # */
2425
if ch != 0x23 or pos >= maximum:

0 commit comments

Comments
 (0)