Skip to content

Allow multiple lines in args' description.#41

Open
vindex10 wants to merge 6 commits into
Feneric:masterfrom
vindex10:multline-args
Open

Allow multiple lines in args' description.#41
vindex10 wants to merge 6 commits into
Feneric:masterfrom
vindex10:multline-args

Conversation

@vindex10

@vindex10 vindex10 commented Oct 9, 2017

Copy link
Copy Markdown
Contributor

There is an example:

Args:
	a: short def
		Long description,
			>>> print("somecode")
			somecode
		and longer
	b: regular description

I understand, the solution is not brilliant, but I really need this feature for my code to be consistent with:
https://google.github.io/styleguide/pyguide.html#Comments
so, for you to start not from scratch, I propose my solution. Hope you'll have some time to adapt in the right way.

Here is an example of output:
refman.pdf

Args:
	a: short def
		Long description,
			code
			...
			code
		and longer
	b: regular description
…h, then clean. helps to detect the end of multiline property description. allow new lines not to be stripped inside of comments.
@Feneric

Feneric commented Oct 16, 2017

Copy link
Copy Markdown
Owner

I'd like to incorporate this, but I have two comments:

We're already importing some items from re; why not just import match directly the same way rather than the full module in order to remain consistent? If there's a good reason to import the full module, we should change the rest of the code to make use of that import to remain consistent that way. We should do it one way or the other.

We need to add tests for this new behavior.

Thank you for your help.

@vindex10

vindex10 commented Oct 17, 2017

Copy link
Copy Markdown
Contributor Author

import re fixed. (I'm not sure how much time needed for changes to reflect here, but they are present in the same branch in my fork)

Could you share examples of existing tests with me?
Thanks!

@Feneric

Feneric commented Oct 17, 2017

Copy link
Copy Markdown
Owner

Sure, please take a look in the test folder in doxypypy. You should see lots of sample inputs with their respective expected outputs for different argument combinations. There's a shell script that generates the output files for the input files, and a Python script that will run the tests using the regular Python unit testing framework. We try to ensure that all major functionality of doxypypy is covered by these tests, and rerun them prior to all actual releases.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants