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

Allow multiple lines in args' description. #41

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vindex10
Copy link
Contributor

@vindex10 vindex10 commented Oct 9, 2017

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
Copy link
Owner

Feneric commented Oct 16, 2017

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
Copy link
Contributor Author

vindex10 commented Oct 17, 2017

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
Copy link
Owner

Feneric commented Oct 17, 2017

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.

None yet

2 participants