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

Document Python docstring style guide #312

Open
aaronsteers opened this issue Aug 2, 2022 · 2 comments
Open

Document Python docstring style guide #312

aaronsteers opened this issue Aug 2, 2022 · 2 comments

Comments

@aaronsteers
Copy link
Contributor

aaronsteers commented Aug 2, 2022

As uncovered here, we should be better documenting the docstring standards we have for Python.

In short, our docstring standard as of today is that we use the Google format. Basically, I think we use the standard off-the-shelf standard - except also do not put parameter type hints into docstrings when those are redundant with the method/function signature as already required by mypy.

@edgarrmondragon
Copy link
Contributor

Our linter jobs already check for Google-style docstrings via darglint + flake8, so we should standardize to what's already working to auto-generate docs in the SDK.

If we were to start from scratch, I'd prefer Parameters instead of Args for our method parameters but given that we want consistency, changing the SDK to follow Meltano's lead wouldn't make much sense.

@WillDaSilva
Copy link
Member

but given that we want consistency, changing the SDK to follow Meltano's lead wouldn't make much sense.

I don't understand this @edgarrmondragon. Why not just change both? We know with certainty that either one works with all of the tools we use, and "parameters" is the more accurate.

I don't want to blow this out of proportion, but it's a matter I (probably irrational) feel very strongly about, so if we're going to choose to go with the option that is technically incorrect, I'd want there to be a very good reason for it.

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

3 participants