I'm interested in adding a new rule to check for Decimal being called with a float literal argument. For example:
# Don't
d = Decimal(1.234)
# Do
d = Decimal('1.234')
This seems like a generally useful check. I searched for open issues and PRs involving Decimal and didn't find any mention of this type of check. I'm happy to work on a PR, but wanted to make sure this check makes sense in ruff. Please let me know if I'm missing something or there's any reason this check wouldn't be accepted.
Thanks!
I'm interested in adding a new rule to check for
Decimalbeing called with a float literal argument. For example:This seems like a generally useful check. I searched for open issues and PRs involving
Decimaland didn't find any mention of this type of check. I'm happy to work on a PR, but wanted to make sure this check makes sense inruff. Please let me know if I'm missing something or there's any reason this check wouldn't be accepted.Thanks!