Skip to content
Snippets Groups Projects
Commit 5dceb545 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fix typing

parent a1a46e95
No related branches found
No related tags found
No related merge requests found
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
* `memoize` will release the per-function lock while calling target function * `memoize` will release the per-function lock while calling target function
* added `cache_memoize` * added `cache_memoize`
* added `words_to_int` * added `words_to_int`
* added covariance to hashable for `satella.coding.typing.K`
...@@ -8,6 +8,7 @@ They are as follows: ...@@ -8,6 +8,7 @@ They are as follows:
* `ExceptionClassType` - base type of exception class * `ExceptionClassType` - base type of exception class
* `Number` - an amalgam of int and float * `Number` - an amalgam of int and float
* `T`, `U`, `K`, `V` - type vars to use * `T`, `U`, `K`, `V` - type vars to use
* Note that `K` must be hashable
* `Iteratable` - a generic iterator or an iterable of `T` * `Iteratable` - a generic iterator or an iterable of `T`
* `NoArgCallable` - a callable with no arguments returning `T` * `NoArgCallable` - a callable with no arguments returning `T`
* `Appendable` - an object which has the `append` method * `Appendable` - an object which has the `append` method
......
...@@ -6,7 +6,7 @@ T = tp.TypeVar('T') ...@@ -6,7 +6,7 @@ T = tp.TypeVar('T')
Iteratable = tp.Union[tp.Iterator[T], tp.Iterable[T]] Iteratable = tp.Union[tp.Iterator[T], tp.Iterable[T]]
U = tp.TypeVar('U') U = tp.TypeVar('U')
V = tp.TypeVar('V') V = tp.TypeVar('V')
K = tp.TypeVar('K') K = tp.TypeVar('K', covariant=tp.Hashable)
KVTuple = tp.Tuple[K, V] KVTuple = tp.Tuple[K, V]
Number = tp.Union[int, float] Number = tp.Union[int, float]
NoArgCallable = tp.Callable[[], T] NoArgCallable = tp.Callable[[], T]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment