Skip to content

Commit 3656974

Browse files
committed
type annotations
1 parent c106df8 commit 3656974

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

nbformat/validator.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import pprint
88
import warnings
99
from copy import deepcopy
10+
from typing import Any, Optional
1011

1112
from ._imports import import_item
1213
from .corpus.words import generate_corpus_id
@@ -247,7 +248,13 @@ def better_validation_error(error, version, version_minor):
247248
return NotebookValidationError(error, ref)
248249

249250

250-
def normalize(nbdict, version=None, version_minor=None, *, relax_add_props: bool = False):
251+
def normalize(
252+
nbdict: Any,
253+
version: Optional[int] = None,
254+
version_minor: Optional[int] = None,
255+
*,
256+
relax_add_props: bool = False,
257+
) -> Any:
251258
"""
252259
Normalise a notebook prior to validation.
253260
@@ -414,7 +421,7 @@ def validate(
414421
raise error
415422

416423

417-
def _try_fix_error(nbdict, version: int, version_minor: int, relax_add_props: bool) -> int:
424+
def _try_fix_error(nbdict: Any, version: int, version_minor: int, relax_add_props: bool) -> int:
418425
"""
419426
This function try to extract errors from the validator
420427
and fix them if necessary.

0 commit comments

Comments
 (0)