Nothing Special   »   [go: up one dir, main page]

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 option to replace todo #8

Closed
wants to merge 14 commits into from
Closed

Add option to replace todo #8

wants to merge 14 commits into from

Conversation

vkasljevic
Copy link

Prelude

Thank you for helping out DoGe!

By contributing to DoGe you agree to the following statements (Replace [ ] with [x] with those you agree with):

Why this PR?

This PR enables user to use configurable placeholder in generated documentation.
For ex. instead of using TODO as placeholder I could use TODO(<user>).

@kkoomen
Copy link
Owner
kkoomen commented Jul 17, 2019

Thanks for putting quite some effort into this. However, I don't understand why you want to use TODO(<user>) to be set globally for everything? This would, for example, end up in:

def myMethod(self: MyClass, p1: Sequence[T]) -> Generator[int, float, str]:
    """
    TODO(<user>)

    :param self MyClass: TODO(<user>)
    :param p1 Sequence[T]: TODO(<user>)
    :rtype Generator[int, float, str]: TODO(<user>)
    """
    pass

I'm not seeing in why this would be useful. I can understand it if you want to add more context to what the TODO should contain.

For example, this would be logical in a scenario where the numpy doc for Python has two TODO items at the top but it's not super clear what it should be. NOTE: I am planning to build this soon, giving more context to TODO items.

Then this output would be more logical:

    def call(self, *args: str, **kwargs: str) -> str:
        """
        TODO(<summary>)
        
        TODO(<description>)
        
        Parameters
        ----------
        self : any
            TODO(<description>)
        args : str
            TODO(<description>)
        kwargs : str
            TODO(<description>)
        
        Returns
        -------
        str:
            TODO(<description>)
        """
        pass

but this is not what you've submitted, so please, explain why this would be useful.

@vkasljevic
Copy link
Author

Well, my case is that I have script for listing TODOs that matches only my TODO(<user>) because I work on large codebase with a lot of other people. I did this so that they could play along nicely, but I thought that someone else might have same inconvenience. Also, I don't have to keep my fork up to date.

As for the adding context to TODOs, it doesn't seem like that much extra work, I could add it if you want.

@kkoomen kkoomen added wontfix This will not be worked on feature New feature or request and removed wontfix This will not be worked on labels Jul 18, 2019
@kkoomen
Copy link
Owner
kkoomen commented Jul 18, 2019

I will add the context feature for now by myself, however I don't think this is something DoGe needs. If you want to give your descriptions more context for certain users you work with then this is a content issue and up to the user to add.

I'll close the issue for now. Thanks for submitting your idea.

@kkoomen kkoomen closed this Jul 18, 2019
@kkoomen
Copy link
Owner
kkoomen commented Jul 18, 2019

The TODO context support is released in v1.4.0.

@kkoomen kkoomen self-assigned this Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants