-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
for more information, see https://pre-commit.ci
datatree/datatree.py
Outdated
Examples | ||
-------- | ||
>>> dt = DataTree.from_dict( | ||
>>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keewis blackdoc raised an error here:
error: cannot format /code/datatree/datatree.py: Cannot parse: 1217:0: EOF in multi-line statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not proper doctest, you need to use ...
for continuation lines.
I guess blackdoc
could be extended to detect this, but that would mean that it would have to parse python code itself (which it does not so far, and would make it a fair bit more complicated): it detects code blocks using the doctest syntax and then applies black
to each of them separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh - I copied this from syntax used in the docstring of xarray's Dataset.map
. So I guess it should look like this example from pint-xarray. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually no I'm just being an idiot
* test * implementation * documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * whatsnew * API * correct faulty test * remove newline * search-> match * format continuation lines correctly --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pre-commit run --all-files
api.rst
docs/source/whats-new.rst