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

DOC202 false positive with abstract methods #12893

Closed
MichaReiser opened this issue Aug 14, 2024 · 2 comments
Closed

DOC202 false positive with abstract methods #12893

MichaReiser opened this issue Aug 14, 2024 · 2 comments

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Aug 14, 2024

I really like these new rules, they provide a lot of extra guardrails for docstrings!

When trying to start using rule DOC202 I ran into a bug. When defining an abstract method, the rule raises an error, because nothing is returned (which makes sense, since it's an empty method, the real code is in the subclasses).

As a small example, an error is raised for this method:

    @property
    @abc.abstractmethod
    def realised_prices(self) -> pd.DataFrame:
        """
        The realised prices of the market.

        Returns:
            The realised prices as a DataFrame
        """

Originally posted by @RubenVanEldik in #12434 (comment)

@MichaReiser
Copy link
Member Author

This should be resolved by #12771 We plan to get a release out today or tomorrow

@RubenVanEldik
Copy link
Contributor

Sorry, I missed the PR that solved this issue, absolutely amazing work!! ❤️❤️❤️

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

No branches or pull requests

2 participants