gh-97959: Fix rendering of routines in pydoc (GH-113941)

* Class methods no longer have "method of builtins.type instance" note.
* Corresponding notes are now added for class and unbound methods.
* Method and function aliases now have references to the module or the
  class where the origin was defined if it differs from the current.
* Bound methods are now listed in the static methods section.
* Methods of builtin classes are now supported as well as methods of
  Python classes.
This commit is contained in:
Serhiy Storchaka 2024-02-11 15:19:44 +02:00 committed by GitHub
parent b104360788
commit 2939ad02be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 333 additions and 72 deletions

View file

@ -4851,22 +4851,22 @@ class Color(enum.Enum)
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.EnumType:
| Static methods inherited from enum.EnumType:
|
| __contains__(value) from enum.EnumType
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name) from enum.EnumType
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__() from enum.EnumType
| __iter__()
| Return members in definition order.
|
| __len__() from enum.EnumType
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------