5.1 is a valid float, however when the script is run, the following error is raised:
Traceback (most recent call last):
File "/Users/.../pyproproperror.py", line 15, in <module>
this_will_error = ExampleClass(5.1)
File "/Users/.../pyproproperror.py", line 13, in __init__
self.error_float = error_float
File "/Users/.../site-packages/pyproprop/processed_property.py", line 228, in prop
value = method(value, *args, **kwargs)
File "/Users/.../site-packages/pyproprop/processed_property.py", line 260, in check_expected_type
value = check_type(value, expected_type, name_str, optional,
File "/Users/.../site-packages/pyproprop/processed_property.py", line 299, in check_type
raise TypeError(msg)
TypeError: `error_float` must be a <class 'float'>, instead got a <class 'tuple'>.
Process finished with exit code 1
Now running the same script again, but with iterable_allowed=False, the script runs without issue.
Steps to reproduce
Use pyproprop version 0.4.3 or 0.4.2
Example
For example see the following script:
5.1 is a valid float, however when the script is run, the following error is raised:
Now running the same script again, but with iterable_allowed=False, the script runs without issue.