Skip to content

Commit d2af9d4

Browse files
committed
Fix mypy errors
1 parent 73837fa commit d2af9d4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/test-pcbdraw.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
make git librsvg2-bin xvfb xdotool bats
2222
sudo python3 -m pip install mypy
2323
python3 -m pip install -e .\[dev\]
24+
- run: mypy --version
2425
- run: make mypy
2526
- run: make test
2627
- run: make package

pcbdraw/mistune_shim.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import mistune # type: ignore
1+
# type: ignore
2+
import mistune
23

34
__all__ = [
45
"BaseRenderer",
@@ -13,16 +14,15 @@
1314
mistune_major_version = mistune_version[0]
1415

1516
if mistune_major_version == 3:
16-
from mistune.plugins.footnotes import \
17-
footnotes as plugin_footnotes # type: ignore
18-
from mistune.plugins.table import table as plugin_table # type: ignore
17+
from mistune.plugins.footnotes import footnotes as plugin_footnotes
18+
from mistune.plugins.table import table as plugin_table
1919

2020
InlineParser = mistune.InlineParser
2121
HTMLRenderer = mistune.HTMLRenderer
2222
BaseRenderer = mistune.BaseRenderer
2323
elif mistune_major_version == 2:
24-
from mistune.plugins.footnotes import plugin_footnotes # type: ignore
25-
from mistune.plugins.table import plugin_table # type: ignore
24+
from mistune.plugins.footnotes import plugin_footnotes
25+
from mistune.plugins.table import plugin_table
2626

2727
InlineParser = mistune.inline_parser.InlineParser
2828
HTMLRenderer = mistune.renderers.HTMLRenderer

pcbdraw/populate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import pcbdraw.mdrenderer
1717

1818
from .mistune_shim import mistune # type: ignore
19-
from .mistune_shim import (HTMLRenderer, InlineParser, plugin_footnotes,
19+
from .mistune_shim import (HTMLRenderer, InlineParser, plugin_footnotes, plugin_table) # type: ignore
2020
from .pcbnew_common import fakeKiCADGui
2121
from .plot import find_data_file, get_global_datapaths
2222

0 commit comments

Comments
 (0)