diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-10 10:58:46 -0700 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-08-20 18:57:19 +0200 |
commit | c52b454b69414ad60f411ca99bee0348da8e844a (patch) | |
tree | 38112068532d2f7267da17c5f43930bef150f880 /mesonbuild/compilers/compilers.py | |
parent | 0f5f265a1677e7492c9bc1d6e1505a9f493bf847 (diff) | |
download | meson-c52b454b69414ad60f411ca99bee0348da8e844a.zip meson-c52b454b69414ad60f411ca99bee0348da8e844a.tar.gz meson-c52b454b69414ad60f411ca99bee0348da8e844a.tar.bz2 |
mesonlib: Fix typing of substitute_values
This is really, really, annoying. What we really want is (psuedocode):
```python
class SubValues(TypedDict[str, str], total=False):
@INPUT@: T.List[str]
@OUTPUT@: T.List[str]
```
Which would specifiy that `@INPUT@` and `@OUTPUT@` *may* be present and
if they are, then they are lists. There may be additional keys, which
have a single string as a value. Of course there is currently no way to
do that with typing, so we have to instead take a union type and then
use asserts to help the type checker unerstand this.
More info: https://github.com/python/mypy/issues/4617
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
0 files changed, 0 insertions, 0 deletions