Issue
When defining a user keyword with an argument that is typehinted as int, I expect that values are either converted to the type int or rejected. This works with e.g. strings or floats, but bool values appear to be accepted without conversion.
The same thing seems to happen in the reverse case, when passing int/float into a user keyword argument typehinted as bool.
Example
*** Test Cases ***
Example Test
Log As Int ${0}
Log As Int 0
Log As Int ${FALSE}
Log As Int ${TRUE}
Log As Int ${3.0}
Log To Console ---------
Log As Bool ${0}
Log As Bool 0
Log As Bool ${FALSE}
Log As Bool ${TRUE}
Log As Bool ${3.0}
*** Keywords ***
Log As Int
[Arguments] ${value: int}
Log To Console ${value} ${{type(${value})}}
Log As Bool
[Arguments] ${value: bool}
Log To Console ${value} ${{type(${value})}}
Relevant console output:
0 <class 'int'>
0 <class 'int'>
False <class 'bool'>
True <class 'bool'>
3 <class 'int'>
---------
0 <class 'int'>
False <class 'bool'>
False <class 'bool'>
True <class 'bool'>
3.0 <class 'float'>
Versions
Python 3.13.0
Robot Framework 7.4.1
Issue
When defining a user keyword with an argument that is typehinted as int, I expect that values are either converted to the type int or rejected. This works with e.g. strings or floats, but bool values appear to be accepted without conversion.
The same thing seems to happen in the reverse case, when passing int/float into a user keyword argument typehinted as bool.
Example
Relevant console output:
Versions
Python 3.13.0
Robot Framework 7.4.1