pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.62k stars 309 forks source link

Add missing docstrings to twine source #635

Open bhrutledge opened 4 years ago

bhrutledge commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 3 years ago

I'll start working on this issue.

bhrutledge commented 3 years ago

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