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

Add multiline description support, more helpful error messages #121

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

Conversation

felixvd
Copy link

@felixvd felixvd commented May 12, 2022

I've encountered some cases that don't tell the user what to fix. This catches the exception and localizes the error.

It also supports multi-line comments.

Example:

def myfunc():
    """Text
    
    :param myparam1: text followed by an empty line (will throw an error)
    
    :param myparam2: more text
        with an extra line (will work fine)
    :param myparam3 which has no closing colon (will throw an error)`
    """
    pass

Copy link

@a-t-0 a-t-0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear Felix, thank you for your work. I was trying to review your code and thought it would be easier to understand if you could include a test case that demonstrates how your adaptations change the behaviour of pyment. (I noted your example on the support for multiline in the comment with the pull request). Would you perhaps be willing and able to write two of such tests?

  • Possibly one to demonstrate how your adaptation yields more helpful error messages.
  • And perhaps one that demonstrates the support for multiline descriptions?

Note, I have no affiliations with pyment, however I noticed it has not been updated in almost 1.2 years, so I thought it would be nice to show some interaction to perhaps get the ball rolling (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