Skip to content

Commit

Permalink
Add mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Feb 19, 2024
1 parent ffe15e5 commit 747d25c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ipython_markdown_inspector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from functools import partial
from typing import Any, Optional, Union
from typing import Any, List, Optional, Union

from IPython.core.interactiveshell import InteractiveShell
from IPython.core.oinspect import OInfo
Expand All @@ -20,7 +20,7 @@ def hook(
# fallback for IPython 8.21
obj = obj_or_data
detail_level = 0
omit_sections = []
omit_sections: List[str] = []
info_dict = ipython.inspector.info(
obj, "", info=info, detail_level=detail_level
)
Expand Down Expand Up @@ -50,4 +50,4 @@ def unload_ipython_extension(ipython: InteractiveShell):
ipython.inspector.mime_hooks["text/markdown"] = ORIGINAL_HOOK


__all__ = []
__all__: List[str] = []
2 changes: 1 addition & 1 deletion ipython_markdown_inspector/_hook_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
try:
from IPython.core.oinspect import InspectorHookData
from IPython.core.oinspect import InspectorHookData # type: ignore
except ImportError:
# TODO: remove once we require a version which includes
# https://github.com/ipython/ipython/pull/14342
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Changelog = "https://github.com/krassowski/ipython-markdown-inspector/blob/main/

[project.optional-dependencies]
test = [
"pytest"
"pytest",
"mypy"
]
dev = [
"build",
Expand Down

0 comments on commit 747d25c

Please sign in to comment.