-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
F: commentsThe syntactic kind. Not in the language grammar, always on our minds. Best bugs.The syntactic kind. Not in the language grammar, always on our minds. Best bugs.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
i don't know whether black handles this phenomenon purposely this way. i usually put annotations regarding a specific function in general right before it's definition:
# foobar functions
def bar() -> None:
pass
# TODO add type annotations
def foo():
passblack adds two lines between the annotation and a specific function which looks like general, rather module oriented comments or 'section headings' i usually use as well:
# foobar functions
def bar() -> None:
pass
# TODO add type annotations
def foo():
passare there rationales i'm not aware of that lead to this transformation or could this behaviour get changed?
edit: interestingly the snippets in the README also contain such style.
Metadata
Metadata
Assignees
Labels
F: commentsThe syntactic kind. Not in the language grammar, always on our minds. Best bugs.The syntactic kind. Not in the language grammar, always on our minds. Best bugs.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?