benber86/mamushi

[Bug]

chanhosuh opened this issue · 0 comments

Describe the bug
setup.cfg has python_requires = >= 3.8 but mamushi will not work on 3.8 due to its use of str.removeprefix and str.removesuffix

To Reproduce

# @version 0.3.7

# put some comments here
foo: address

@external
def bar():
    pass

Expected behavior
Should output something showing formatting succeeded, e.g.

$ mamushi contracts/mamushi.vy  -v
reformatted contracts/mamushi.vy
All done! ✨ 🍰 ✨
1 file reformatted.

Instead in verbose mode, it outputs:

$ mamushi contracts/mamushi.vy  -v
[...]
AttributeError: 'str' object has no attribute 'removeprefix'
error: cannot format contracts/mamushi.vy: Unable to parse input file, are you sure the Vyper code is valid?

Removing the comment on line 3 results in the expected output.

Desktop (please complete the following information):
N/A

Additional context
Add any other context about the problem here.