benber86/mamushi

[Bug] Mamushi can't parse `10_000`

Closed this issue · 3 comments

Describe the bug
Mamushi throws errors (unable to parse) when a contract contains an underscore as a part of an integer, despite Vyper accepting these numbers as valid.

Unable to parse input file, are you sure the Vyper code is valid?

To Reproduce
Try to lint any vyper smart contract containing an underscore in a number.

Expected behavior
Mamushi accepts 10_000 the same as 10000 and does not error. Perhaps a simpler alternative could be to at least warn users that this is a possible source of the error message.

Desktop (please complete the following information):

  • OS: MacOS 12.7.5
  • Mamushi version 0.0.2a1
  • Vyper version 0.3.9

Additional context
Using underscores in smart contracts is common practice to allow for clear, visual separation of thousands places.

This should have been fixed in #31
Are you sure you are using the latest version?
If not could you provide an example to reproduce?

My bad, the fix was not included in the last release on pypi, this should now be fixed:
https://pypi.org/project/mamushi/0.0.2b0/

please try again and let me know if that solved your issue

confirmed that it works with the latest version, thanks!