]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/black/rusty.py
1 """An error-handling model influenced by that used by the Rust programming language
3 See https://doc.rust-lang.org/book/ch09-00-error-handling.html.
5 from typing
import Generic
, TypeVar
, Union
8 E
= TypeVar("E", bound
=Exception)
12 def __init__(self
, value
: T
) -> None:
19 class Err(Generic
[E
]):
20 def __init__(self
, e
: E
) -> None:
27 Result
= Union
[Ok
[T
], Err
[E
]]