bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool.py: Update type hints and docstring.


From: Bruno Haible
Subject: Re: gnulib-tool.py: Update type hints and docstring.
Date: Sun, 21 Apr 2024 13:07:53 +0200

Collin Funk wrote:
> Two type hints are incorrectly marked 'dict[str, str]' instead of
> 'dict[str, tuple[re.Pattern, str] | None]'. I assume I forgot to
> change these when inlining sed expressions to use re.sub().

Thanks, applied.

> Now that I think about it, I should have used a list of re.sub()
> arguments. But I think these variables are only used by the 'config-h'
> module to replace "#if HAVE_CONFIG_H" with "#if 1". Until we need
> something more complex than that, how it is currently written should
> work fine.

Yes, please. Add complexity only when it is needed.

Also, what about the type of filetable? It is described as

  dict[str, list[str]]

but I think it is more

  dict[str, list[str | tuple[str, str]]]

right?

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]