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 missing docstrings to twine source #635

Open
bhrutledge opened this issue May 27, 2020 · 5 comments
Open

Add missing docstrings to twine source #635

bhrutledge opened this issue May 27, 2020 · 5 comments

Comments

@bhrutledge
Copy link
Contributor

I recommend doing these in small batches, and reviewing the patterns already in use for the existing docstrings. I don't yet have a style guide in mind (beyond what's enforced by flake8-docstrings); maybe that will emerge as part of this work.

Count per error code:

$ flake8 -qq --per-file-ignores= --select=D1 --statistics twine
12    D100 Missing docstring in public module
10    D101 Missing docstring in public class
34    D102 Missing docstring in public method
14    D103 Missing docstring in public function
2     D104 Missing docstring in public package

Count per file:

$ flake8 --per-file-ignores= --select=D1 twine | grep -oE '^.*\.py\b' | sort | uniq -c
   1 twine/__init__.py
   2 twine/__main__.py
   3 twine/_installed.py
  14 twine/auth.py
   4 twine/cli.py
   1 twine/commands/__init__.py
   3 twine/commands/check.py
   3 twine/commands/register.py
   4 twine/commands/upload.py
   1 twine/exceptions.py
   8 twine/package.py
  11 twine/repository.py
   2 twine/settings.py
   6 twine/utils.py
   5 twine/wheel.py
   4 twine/wininst.py
@deveshks
Copy link
Contributor

deveshks commented Jun 7, 2020

Do you have a specific set of files in mind from the above list per PR, so that the effort spend in both writing/rewriting them while reviewing them is reduced?

@sigmavirus24
Copy link
Member

@deveshks are you looking for guidance about which files to address in a PR? I think the most important aspects are going to be twine/package.py twine/repository.py and twine/settings.py as those are documented as part of our public API and will need extreme care and caution and may lead to a lot of bikeshedding. The twine/commands/*.py files are probably going to lead to less discussion. Does that help?

@deveshks
Copy link
Contributor

deveshks commented Jun 8, 2020

The twine/commands/*.py files are probably going to lead to less discussion. Does that help?

Thanks for the info, I will probably start with these first.

@dukecat0
Copy link
Member

dukecat0 commented Aug 1, 2021

I'll start working on this issue.

@bhrutledge
Copy link
Contributor Author

Any PRs for this issue should remove the relevant per-file-ignores entry in https://github.com/pypa/twine/blob/main/.flake8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants