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

Incorrect D405 on lowercase "attributes" used in docstring. #311

Closed
TimZaman opened this issue Apr 30, 2018 · 2 comments
Closed

Incorrect D405 on lowercase "attributes" used in docstring. #311

TimZaman opened this issue Apr 30, 2018 · 2 comments
Assignees

Comments

@TimZaman
Copy link

@TimZaman TimZaman commented Apr 30, 2018

    def clip(self, attributes_per_polyline):  # noqa: D405 (pydocstring bug)
        """
        Some stuff here.

        Args:
            attributes_per_polyline (tensor): attributes for each polyline.

        Returns:
            stuff
        """

Throws:
D405

stuff.py:1337 in public method `clip`:
        D405: Section name should be properly capitalized ('Attributes', not 'attributes')

I think 'attributes' is seen as some kind of special keyword here by pydocstyle, which it isn't/doesn't have to be.

@Nurdok Nurdok added this to To do in Pydocstyle 2.2.0 Jun 6, 2018
@shacharoo shacharoo moved this from To do to In progress in Pydocstyle 2.2.0 Jun 6, 2018
@shacharoo shacharoo self-assigned this Jun 6, 2018
@shacharoo

This comment has been minimized.

Copy link
Member

@shacharoo shacharoo commented Jun 6, 2018

'Attributes' is a section name in the numpy docstring conventions. Although this is a bug (we recognize the prefix "attributes" of "attributes_per_polyline"), you should make sure you're using the right conventions for your project.

@TimZaman

This comment has been minimized.

Copy link
Author

@TimZaman TimZaman commented Jun 6, 2018

Our convention is Args.

Nurdok added a commit that referenced this issue Jun 11, 2018
* Fix false-positive section recognition in D405

Solves #311

* Missed a file

* Add release notes

* Release notes

* Added more edge cases

* Simplify code

* Addressed CR comments
@shacharoo shacharoo moved this from In progress to Done in Pydocstyle 2.2.0 Jun 11, 2018
@shacharoo shacharoo closed this Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.