Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: It seems the `Returns` section does not support multiple lines for single object #10

Closed
wq2012 opened this issue Jan 24, 2019 · 3 comments

Comments

2 participants
@wq2012
Copy link
Contributor

commented Jan 24, 2019

Expected Behavior

Like Args, I expect Returns and Raises to support multiple lines to describe a single object.

Actual Behavior

The second line is treated as a new paragraph.

This is my code:

  Returns:
    sampled_index_sequences: (a list of numpy arrays) - a list of subsampled
      block-preserving permuted sequences. For example,
      ```
      sampled_index_sequences =
      [[10,11,12,1,2,6],
       [6,1,2,10,11,12],
       [1,2,10,11,12,6],
       [6,1,2,10,11,12],
       [1,2,6,10,11,12]]
      ```
      The length of "sampled_index_sequences" is "number_samples".

This is what I got:
screenshot from 2019-01-24 11-33-04

The should not be a new paragraph between "sampled" and "block-preserving".

Steps to Reproduce

N/A

Additional info

  • pdoc version:
    0.5.1
@kernc

This comment has been minimized.

Copy link
Contributor

commented Jan 25, 2019

Thanks! This had worked in 0.5.1 (you are using master), see pdoc.test.example_pkg.google() Raises AttributeError.

Raises:
AttributeError: The ``Raises`` section is a list of all exceptions
that are relevant to the interface.
and a third line.

@kernc kernc added this to the 0.5.2 milestone Jan 25, 2019

@kernc kernc closed this in 3cda116 Jan 27, 2019

@kernc

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2019

It didn't work in 0.5.1. Now hopefully is fixed.

@kernc kernc added the bug label Jan 27, 2019

kernc added a commit that referenced this issue Jan 27, 2019

BUG: Google docformat: avoid extra <p> for single arg descriptions
Caused by `inspect.cleandoc()` which removes leading
whitespace safely removable from the *second* line onwards.

Fixes #10
@wq2012

This comment has been minimized.

Copy link
Contributor Author

commented Jan 27, 2019

Works now. That's great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.