[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py: Update type hints and docstring.
From: |
Collin Funk |
Subject: |
gnulib-tool.py: Update type hints and docstring. |
Date: |
Sat, 20 Apr 2024 20:03:44 -0700 |
User-agent: |
Mozilla Thunderbird |
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().
Previously the dict would be:
# key : value
'file-category' : 'sed-expression'
but now it is:
# Arguments for re.sub()
'file-category' : (regexp, 'replacement-string')
# or no replacements needed.
'file-category' : None
I've also updated an outdated doc string since we no longer use sed
invocations for this and we don't perform license replacements on
source files.
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.
Collin
0001-gnulib-tool.py-Update-type-hints-and-docstring.patch
Description: Text Data
- gnulib-tool.py: Update type hints and docstring.,
Collin Funk <=