bug-gnulib
[Top][All Lists]
Advanced

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

gnulib-tool.py: Use 'Any' instead of type unions in GLConfig.


From: Collin Funk
Subject: gnulib-tool.py: Use 'Any' instead of type unions in GLConfig.
Date: Thu, 4 Apr 2024 21:53:05 -0700
User-agent: Mozilla Thunderbird

Also, removing these large type unions and using 'Any'. I've ran all
the test cases with Python 3.7 to double check it is compatible.

If we have 'var' of type 'str | bool' and we are sure it is a string
and want to do this:

    new_var = var.split(' ')

you will see warnings from type checkers because bool doesn't have a
split method. Since these type unions are so large, Any makes more sense.

Collin

Attachment: 0003-gnulib-tool.py-Use-Any-instead-of-type-unions-in-GLC.patch
Description: Text Data


reply via email to

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