Skip to content

Commit 772981a

Browse files
committed
Shortening the length of examples
1 parent 4d7db26 commit 772981a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ Callable[[int | float], any]
2525

2626
Also you can use Union with input_annotation
2727
```python
28-
summator_of = CustomAnnotationFactory(Callable, [[input_annotation | str, input_annotation | int], str | int])
28+
summator_of = CustomAnnotationFactory(Callable, [[input_annotation | int, input_annotation], int])
2929
summator_of[SomeCustomNumber]
3030
```
3131

3232
What results in
3333
```python
34-
Callable[[SomeCustomNumber | str, SomeCustomNumber | int], str | int]
34+
Callable[[SomeCustomNumber | int, SomeCustomNumber], int]
3535
```
3636

3737
Ultimately you can annotate by the results of factories
3838
```python
39-
def some_operation_by(main: handler_of[int | float], *middleware: summator_of[SomeCustomNumber]) -> handler_of[int | float]:
39+
def some_operation_by(
40+
main: handler_of[int | float],
41+
*middleware: summator_of[SomeCustomNumber]
42+
) -> handler_of[int | float]:
4043
...
4144
```

0 commit comments

Comments
 (0)