Skip to content

Commit c5dd1d3

Browse files
committed
Information about FormalAnnotation in the README
1 parent a435b2b commit c5dd1d3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@ What results in
3434
Callable[[SomeCustomNumber | int, SomeCustomNumber], int]
3535
```
3636

37-
Ultimately you can annotate by the results of factories
37+
In addition, you can also annotate something regardless of its type
38+
```python
39+
even = FormalAnnotation("Formal annotation of even numbers.")
40+
41+
number: even[int | float] = 42
42+
```
43+
44+
Full example
3845
```python
3946
def some_operation_by(
40-
main: handler_of[int | float],
41-
*middleware: summator_of[SomeCustomNumber]
47+
handler: handler_of[int | float],
48+
number: even[float],
49+
*middleware_handlers: summator_of[SomeCustomNumber]
4250
) -> handler_of[int | float]:
4351
...
4452
```

0 commit comments

Comments
 (0)