Skip to content

Commit

Permalink
fixup typings
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Oct 1, 2023
1 parent a1fec27 commit aeb19cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions nbconvert/nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ class NbConvertApp(JupyterApp):

version = __version__
name = "jupyter-nbconvert"
aliases = nbconvert_aliases
flags = nbconvert_flags
aliases = nbconvert_aliases # type:ignore[assignment]
flags = nbconvert_flags # type:ignore[assignment]

@default("log_level")
def _log_level_default(self):
Expand Down Expand Up @@ -597,7 +597,7 @@ def document_flag_help(self):
Return a string containing descriptions of all the flags.
"""
flags = "The following flags are defined:\n\n"
for flag, (cfg, fhelp) in self.flags.items():
for flag, (cfg, fhelp) in self.flags.items(): # type:ignore[has-type]
flags += f"{flag}\n"
flags += indent(fill(fhelp, 80)) + "\n\n"
flags += indent(fill("Long Form: " + str(cfg), 80)) + "\n\n"
Expand All @@ -607,7 +607,7 @@ def document_alias_help(self):
"""Return a string containing all of the aliases"""

aliases = "The following aliases are defined:\n\n"
for alias, longname in self.aliases.items():
for alias, longname in self.aliases.items(): # type:ignore[has-type]
aliases += f"\t**{alias}** ({longname})\n\n"
return aliases

Expand Down
2 changes: 1 addition & 1 deletion nbconvert/preprocessors/sanitize.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SanitizeHTML(Preprocessor):
"""A preprocessor to sanitize html."""

# Bleach config.
attributes = Any( # type:ignore[call-overload]
attributes = Any(
config=True,
default_value=ALLOWED_ATTRIBUTES,
help="Allowed HTML tag attributes",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ nowarn = "test -W default {args}"

[tool.hatch.envs.typing]
features = ["test"]
dependencies = ["mypy>=1.5.1", "traitlets>=5.10"]
dependencies = ["mypy>=1.5.1", "traitlets>=5.10.1", "jupyter_core>=5.3.2"]
[tool.hatch.envs.typing.scripts]
test = "mypy --install-types --non-interactive {args}"

Expand Down

0 comments on commit aeb19cd

Please sign in to comment.