pycodestyle
pycodestyle copied to clipboard
E303: Does not report, that a blank line between classes is needed, if they're defined inside an if statement
As stated in PEP8:
Separate top-level function and class definitions with two blank lines.
if __name__ == '__main__':
class Pos:
def __init__(self, x, y):
self.x = x
self.y = y
class Lifetime:
def __init__(self, lifetime):
if lifetime < 0:
raise ValueError('lifetime must be above 0')
self.lifetime = lifetime
class Name:
def __init__(self, name):
self.name = '"' + name + '"'
Svelvet 8 now features composable Edges, so the new way to achieve this (if I'm understanding you correctly) would be to pass the Edge as a child of the Anchor component with slot=edge
. You can then pass whatever context specific props you want.
@briangregoryholmes is there a way to change the position of the label? E.g. at the end of the child node?
@KiraPC A version released today will have a new labelPosition
prop on the Edge component that takes a value between 0 an 1 (defaults to 0.5).
Amazing. I'll try it in this week