search for: ret_type_hint

Displaying 3 results from an estimated 3 matches for "ret_type_hint".

2020 Jul 06
2
[PATCH] python: Add type hints
...,6 +685,7 @@ logvols = g.lvs() import os import sys import libguestfsmod +from typing import Union, List, Tuple, Optional "; @@ -802,14 +803,44 @@ class GuestFS(object): fun f -> let ret, args, optargs = f.style in let len_name = String.length f.name in + let ret_type_hint = + match ret with + | RErr -> "None" + | RInt _ | RInt64 _ -> "int" + | RBool _ -> "bool" + | RConstOptString _ -> "Optional[str]" + | RConstString _ | RString _ -> "str" + | RBufferOu...
2020 Jul 06
0
Re: [PATCH] python: Add type hints
...sys > import libguestfsmod > +from typing import Union, List, Tuple, Optional > > "; > > @@ -802,14 +803,44 @@ class GuestFS(object): > fun f -> > let ret, args, optargs = f.style in > let len_name = String.length f.name in > + let ret_type_hint = > + match ret with > + | RErr -> "None" > + | RInt _ | RInt64 _ -> "int" > + | RBool _ -> "bool" > + | RConstOptString _ -> "Optional[str]" > + | RConstString _ | RString _ -> "...
2020 Jul 07
1
Re: [PATCH] python: Add type hints
...+from typing import Union, List, Tuple, Optional > > > > "; > > > > @@ -802,14 +803,44 @@ class GuestFS(object): > > fun f -> > > let ret, args, optargs = f.style in > > let len_name = String.length f.name in > > + let ret_type_hint = > > + match ret with > > + | RErr -> "None" > > + | RInt _ | RInt64 _ -> "int" > > + | RBool _ -> "bool" > > + | RConstOptString _ -> "Optional[str]" > > + | RConstStr...