diff --git a/docs/pages/concept.rst b/docs/pages/concept.rst index 26432cd..ca27c5e 100644 --- a/docs/pages/concept.rst +++ b/docs/pages/concept.rst @@ -129,11 +129,11 @@ function signatures and return types in all cases: ... def example(instance) -> str: ... return 'default' ... - >>> @example.register + >>> @example.register(int) ... def _example_int(instance: int, other: int) -> int: ... return instance + other ... - >>> @example.register + >>> @example.register(str) ... def _example_str(instance: str) -> bool: ... return bool(instance) ... diff --git a/docs/pages/typesafety.rst b/docs/pages/typesafety.rst index b8a13ef..ac3125c 100644 --- a/docs/pages/typesafety.rst +++ b/docs/pages/typesafety.rst @@ -82,7 +82,7 @@ So, this would not work: ... Traceback (most recent call last): ... - TypeError: Subscripted generics cannot be used with class and instance checks + TypeError: ... But, this will (note that we use ``list`` inside ``.instance()`` call):