-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
Description
Feature
Implement a new check that emits an error when the following conditions are met:
- A name is typed as
builtins.float
- No runtime cast (
the_name = float(the_name)
) on that name is done - A float-only attribute (like
builtins.float.hex
) on that name is used
This can also be extended for when the builtins.complex.__complex__
attribute (or other complex-only attributes) is used on a builtins.complex
-typed name without a runtime cast.
Pitch
This document explains the whole problem.