vyperlang / blackadder

MIT License
14 stars 5 forks source link

Interface formatting #3

Open iamdefinitelyahuman opened 3 years ago

iamdefinitelyahuman commented 3 years ago

blackadder currently handles interfaces as though they are class methods:

interface Foo:
    def bar(a: uint256, b: uint256):
        view

    def baz(a: address):
        nonpayable

I think in this case, a more succinct format is actually more readable. Each function definition should be placed on a single line where possible, and there should not be a blank line between functions:

interface Foo:
    def bar(a: uint256, b: uint256): view
    def baz(a: address): nonpayable
spinoch commented 3 years ago

It probably also makes sense to implement #7 before we work on this