Skip to content

Commit

Permalink
Docs: Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Oct 23, 2023
1 parent 2c0fcac commit 6ec7b0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ It is:

- Dispatch on multiple arguments
- Full [specificity](https://runtype.readthedocs.io/en/latest/dispatch.html#specificity) resolution
- [Supports Mypy typing](https://runtype.readthedocs.io/en/latest/dispatch.html#mypy-support-overload), using the `@overload` decorator
- [Supports mypy](https://runtype.readthedocs.io/en/latest/dispatch.html#mypy-support), by utilizing the `@overload` decorator
- Inspired by Julia.

- :star: [**type utilities**](https://runtype.readthedocs.io/en/latest/types.html) - Provides a set of classes to implement your own type-system.
Expand Down
5 changes: 2 additions & 3 deletions docs/dispatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Features:

- Full specificity resolution

- Mypy support: Can be used with @overload decorator
- Mypy support

(Inspired by Julia)

Expand Down Expand Up @@ -197,7 +197,7 @@ MyPy support

multidispatch works with mypy by employing the typing.overload decorator, aiding in granular type resolution.

However, due to the limited design of the overload decorator, there are several rules that need to be followed, and limitations that should be considered.
However, due to the limited design of the `typing.overload` decorator, there are several rules that need to be followed, and limitations that should be considered.

1. For MyPy's benefit, more specific functions should be placed above less specific functions.

Expand All @@ -211,7 +211,6 @@ Example usage:
::

from runtype import multidispatch as md, multidispatch_final as md_final
from typing import overload

@md
def join(seq, sep: str = ''):
Expand Down

0 comments on commit 6ec7b0e

Please sign in to comment.