dep-protobuf/python/google/protobuf/internal
David L. Jones 6f129c123e
Update docs so we can generate better output from Sphinx. (#7295)
This change updates docstrings and comments so that they will produce nicer
formatting and cross-references from Sphinx. There are a few broad categories of
changes:

- Paramter and attribute docs are updated so that types will be recognized by
  Napoleon (https://sphinxcontrib-napoleon.readthedocs.io/en/latest/) This
  usually just means moving a colon in the docstring, so
  `name: (type) description` becomes `name (type): description`.

- References to other symbols can be cross-references if they have the right
  format. For example, "attr_name" might become ":attr:`attr_name`".
  https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cross-referencing-python-objects

- For fenced code blocks, adding a double-colon `::` signifies a literal block.
  https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks

- Some bits of docstrings move from docstring to comments. For TODOs, this
  means we won't be putting stale (or otherwise unrelated) noise into the docs.
  For `Message.DESCRIPTOR`, the change means it gets appropriate documentation.

- There are some wording tweaks for consistency, and some new docstrings
  (especially for methods in Message).

For types, I used the convention of `list[Foo]` and `dict(foo, bar)`, which seem
to be common among other Python rst docstrings. Sphinx should generally
recognize both, and cross-links them correctly (both internally and to Python
library documentation). Upgrading to Python3-style type annotations would allow
us to use `sphinx-autodoc-typehints`; the changes in this commit are very
similar to typing-based hints.
2020-03-10 12:57:30 -07:00
..
import_test_package Delete unused files. 2015-01-27 11:17:18 -08:00
__init__.py Down-integrate from google3. 2018-08-08 17:00:41 -07:00
_parameterized.py Fix up simple typo: invididual -> individual 2019-09-03 16:44:45 -07:00
any_test.proto Merge from google internal 2017-10-18 12:22:18 -07:00
api_implementation.cc Down integrate to Github 2019-04-09 06:23:32 -07:00
api_implementation.py Down integrate to Github 2019-04-09 06:23:32 -07:00
containers.py Update docs so we can generate better output from Sphinx. (#7295) 2020-03-10 12:57:30 -07:00
decoder.py Down integrate to GitHub 2019-10-11 12:05:46 -07:00
descriptor_database_test.py Down integrate to GitHub 2019-05-17 12:01:17 -07:00
descriptor_pool_test.py Down integrate to GitHub 2019-06-11 16:00:16 -07:00
descriptor_pool_test1.proto Down-integrate from internal code base. 2014-11-10 17:34:54 -08:00
descriptor_pool_test2.proto Down integrate from Google internal. 2016-04-28 14:34:59 -07:00
descriptor_test.py Down integrate to GitHub 2019-08-22 17:33:01 -07:00
encoder.py Integrated internal changes from Google 2018-03-13 16:37:29 -07:00
enum_type_wrapper.py Down Integrate Internal Changes 2019-11-12 13:38:58 -08:00
extension_dict.py Fix typos (#7050) 2020-01-08 10:18:20 -08:00
factory_test1.proto Down-integrate from google3. 2018-08-08 17:00:41 -07:00
factory_test2.proto Merge from Google internal for 3.4 release 2017-07-18 15:38:30 -07:00
file_options_test.proto Integrated internal changes from Google 2016-06-29 15:38:03 -07:00
generator_test.py Down integrate to GitHub 2019-04-22 17:12:12 -07:00
json_format_test.py Down Integrate Internal Changes 2019-11-12 13:38:58 -08:00
keywords_test.py Down integrate to Github 2019-04-09 06:23:32 -07:00
message_factory_test.py Down integrate to Github 2019-04-09 06:23:32 -07:00
message_listener.py Replace links to code.google.com/protobuf with developers.google.com/protocol-buffers 2014-10-01 16:26:23 -07:00
message_set_extensions.proto Down-integrate from internal code base. 2015-12-11 17:10:28 -08:00
message_test.py Down integrate to GitHub 2019-10-11 12:05:46 -07:00
missing_enum_values.proto Down-integrate internal changes to github. 2018-12-20 14:21:20 -08:00
more_extensions.proto Down integrate to Github 2019-04-09 06:23:32 -07:00
more_extensions_dynamic.proto Merge from Google internal for 3.4 release 2017-07-18 15:38:30 -07:00
more_messages.proto Down integrate to Github 2019-04-09 06:23:32 -07:00
no_package.proto Down-integrate from google3. 2018-08-08 17:00:41 -07:00
packed_field_test.proto Down-integrate from google3. 2015-08-22 18:25:48 -07:00
proto_builder_test.py Down integrate from Google internal. 2016-04-28 14:34:59 -07:00
python_message.py Down integrate to GitHub 2019-10-11 12:05:46 -07:00
python_protobuf.cc Down integrate to Github 2019-04-09 06:23:32 -07:00
reflection_test.py Down Integrate Internal Changes 2019-11-12 13:38:58 -08:00
service_reflection_test.py Integrated internal changes from Google 2017-09-14 10:03:57 -07:00
symbol_database_test.py Down-integrate from google3. 2017-03-29 14:33:05 -07:00
test_bad_identifiers.proto Down integrate to Github 2019-03-20 11:45:01 -07:00
test_util.py Integrated internal changes from Google 2017-09-14 10:03:57 -07:00
testing_refleaks.py Down integrate to Github 2019-04-09 06:23:32 -07:00
text_encoding_test.py Integrate google internal changes. 2016-03-30 11:39:59 -07:00
text_format_test.py Fix typos (#7050) 2020-01-08 10:18:20 -08:00
type_checkers.py Fix typos (#7050) 2020-01-08 10:18:20 -08:00
unknown_fields_test.py Down integrate to GitHub 2019-10-11 12:05:46 -07:00
well_known_types.py Fix assignment between Python protobuf Structs (#6377) 2019-07-19 15:47:52 -07:00
well_known_types_test.py Fix assignment between Python protobuf Structs (#6377) 2019-07-19 15:47:52 -07:00
wire_format.py Replace links to code.google.com/protobuf with developers.google.com/protocol-buffers 2014-10-01 16:26:23 -07:00
wire_format_test.py Integrate google internal changes. 2016-03-30 11:39:59 -07:00