[gnutls-devel] GnuTLS | jsonopts: make option description type-safe (!1535)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Mar 4 19:33:44 CET 2022



Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/1535 was reviewed by Alexander Sosedkin

--
  
Alexander Sosedkin started a new discussion on src/certtool-options.json: https://gitlab.com/gnutls/gnutls/-/merge_requests/1535#note_863432696

> +        "short-option": "V",
>          "desc": "More verbose output",
> -        "disabled": "",

Since we no longer have `"disabled"`, we can get rid of its handling as well.

--
  
Alexander Sosedkin started a new discussion on src/certtool-options.json: https://gitlab.com/gnutls/gnutls/-/merge_requests/1535#note_863432700

>          "desc": "Input file",
> -        "file-exists": "yes"
> +        "detail": "",

Nit: could it be just omitted?

--
  
Alexander Sosedkin started a new discussion on src/certtool-options.json: https://gitlab.com/gnutls/gnutls/-/merge_requests/1535#note_863432703

> -      "prog-name": "certtool",
> +      "short-usage": "certtool [options]\ncerttool --help for usage instructions.\n",
> +      "explain": "",

Doesn't seem to be handled anywhere, is it OK?

--
  
Alexander Sosedkin started a new discussion on src/certtool-options.json: https://gitlab.com/gnutls/gnutls/-/merge_requests/1535#note_863432707

> -      "desc": "",
> -      "prog-name": "certtool",
> +      "short-usage": "certtool [options]\ncerttool --help for usage instructions.\n",

diff is rather noisy, wonder why

--
  
Alexander Sosedkin started a new discussion on doc/scripts/gen-cmd-texi.py: https://gitlab.com/gnutls/gnutls/-/merge_requests/1535#note_863432710

>                      level: int,
> -                    options: Sequence[Mapping[str, str]]) -> str:
> +                    options: Sequence[Mapping[str, Any]]) -> str:

Not sure if it'd be reasonable to ask for a `TypedDict` schema on everything, but could it be at least a `Mapping[str, Value]`, where `Value` is `Union[str, ValueRange]` and `ValueRange` is a `TypedDict`?


-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1535
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220304/466b9663/attachment.html>


More information about the Gnutls-devel mailing list