Displaying 7 results from an estimated 7 matches for "len_name".
2020 Jul 06
2
[PATCH] python: Add type hints
...or/python.ml
+++ b/generator/python.ml
@@ -685,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 _ | R...
2020 Jul 06
0
Re: [PATCH] python: Add type hints
...@@ 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]"...
2020 Jul 07
1
Re: [PATCH] python: Add type hints
...; 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 _ -...
2020 Jan 10
8
[PATCH 0/7] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python bindings,
leaving only an overly length line in setup.py.
Add a simple optional pycodestyle-based test to avoid regressions in the
future.
Pino Toscano (7):
python: PEP 8: adapt empty lines
python: PEP 8: adapt whitespaces in lines
python: tests: catch specific exception
python: tests: improve variable naming
python: tests:
2020 Jan 10
9
[PATCH v2 0/8] Various Python pycodestyle fixes
Fixes all the pycodestyle issues in the Python bindings, overring one
that does not make sense to change (and it's in setup.py, so almost
irrelevant).
Add a simple optional pycodestyle-based test to avoid regressions in the
future.
Pino Toscano (8):
python: PEP 8: adapt empty lines
python: PEP 8: adapt whitespaces in lines
python: tests: catch specific exception
python: tests:
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi,
this series cleans up the Python sources, either static or generated,
including also tests, to make them PEP 8 compliant; see
https://www.python.org/dev/peps/pep-0008/ and tools like pep8.
Almost all the issues reported by pep8 are fixed, reducing the issues
from 3818 to 7.
The changes should have no effect on the actual code, while it will
help Python users with consistency with other
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
..." (String.uppercase name) bitmask
+ pr "EVENT_%s = 0x%x\n" (String.uppercase_ascii name) bitmask
) events;
pr "EVENT_ALL = 0x%x\n" all_events_bitmask;
pr "\n";
@@ -855,7 +856,7 @@ class GuestFS(object):
f.name (indent_python decl_string (9 + len_name) 78);
if is_documented f then (
- let doc = replace_str f.longdesc "C<guestfs_" "C<g." in
+ let doc = String.replace f.longdesc "C<guestfs_" "C<g." in
let doc =
match ret with
| RErr | RInt _ |...