[PATCH evemu 07/16] python: put a warning comment for private API into the generated file

Benjamin Tissoires benjamin.tissoires at gmail.com
Tue Aug 12 10:47:58 PDT 2014


On Mon, Aug 11, 2014 at 9:34 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> Inserting a tab in front of the top comment to have textwrap.dedent() work
> correctly.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  python/evemu/make-event-names.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/python/evemu/make-event-names.py b/python/evemu/make-event-names.py
> index 2351097..7a100d5 100755
> --- a/python/evemu/make-event-names.py
> +++ b/python/evemu/make-event-names.py
> @@ -90,7 +90,9 @@ def print_python_map(bits):
>         print("")
>
>  def print_python_mapping_table(bits):
> -       p("""# THIS FILE IS GENERATED, DO NOT EDIT
> +       p("""\t# THIS FILE IS GENERATED, DO NOT EDIT

amended locally to have the tab character instead of '\t'. I found it prettier.

Cheers,
Benjamin

> +       # This is module-internal API and subject to change at any time.
> +       # Use evemu.event_get_value() and evemu.event_get_name() instead.
>         """)
>
>         for prefix in prefixes:
> --
> 1.9.3
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list