mamushi
mamushi copied to clipboard
[Bug] Inconsistent treatment of comments
Before mamushi .:
event Sweep:
token: address
amount: uint256
# ============================================================================================
# Constants
# ============================================================================================
UNIT: constant(uint256) = 10**18
# ============================================================================================
# Storage
# ============================================================================================
After mamushi .:
event Sweep:
token: address
amount: uint256
# ============================================================================================
# Constants
# ============================================================================================
UNIT: constant(uint256) = 10**18
# ============================================================================================
# Storage
# ============================================================================================
This extra space below sweep seems off. Or i'd expect those spaces everywhere.
-
mamushi, version 0.0.4
Event declarations are followed by two blank lines. You'd get the same thing with black in Python after declaring a class:
class Test(Enum):
A = 0
B = 1
# Constant declaration
C = 2
is reformated as:
class Test(Enum):
A = 0
B = 1
# Constant declaration
C = 2
UNIT: constant(uint256) = 10**18 is just a variable declaration so the rules for subsequent blank lines are different (simple linebreak if no blank line, one single blank line if multiple blank lines)