diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2024-02-15 13:35:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-15 13:35:56 (GMT) |
commit | 9bc32cdc363dfa00293917be3d694df8fa7f7007 (patch) | |
tree | 74d091354d495e17b68f1e26f91002e428a18d80 /Lib/test/test_pydoc/pydoc_mod.py | |
parent | 0e4f73b8e457b1efa57b735205e8e85a3d11d9f2 (diff) | |
download | cpython-9bc32cdc363dfa00293917be3d694df8fa7f7007.zip cpython-9bc32cdc363dfa00293917be3d694df8fa7f7007.tar.gz cpython-9bc32cdc363dfa00293917be3d694df8fa7f7007.tar.bz2 |
[3.12] gh-108303: Move all `pydoc` related files to `test_pydoc` (GH-114506) (#115502)
(cherry picked from commit ccc76c3e88647e416184bb1f5210b4e8946ae358)
Diffstat (limited to 'Lib/test/test_pydoc/pydoc_mod.py')
-rw-r--r-- | Lib/test/test_pydoc/pydoc_mod.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc/pydoc_mod.py b/Lib/test/test_pydoc/pydoc_mod.py new file mode 100644 index 0000000..80c287f --- /dev/null +++ b/Lib/test/test_pydoc/pydoc_mod.py @@ -0,0 +1,51 @@ +"""This is a test module for test_pydoc""" + +from __future__ import print_function + +import types +import typing + +__author__ = "Benjamin Peterson" +__credits__ = "Nobody" +__version__ = "1.2.3.4" +__xyz__ = "X, Y and Z" + +class A: + """Hello and goodbye""" + def __init__(): + """Wow, I have no function!""" + pass + +class B(object): + NO_MEANING: str = "eggs" + pass + +class C(object): + def say_no(self): + return "no" + def get_answer(self): + """ Return say_no() """ + return self.say_no() + def is_it_true(self): + """ Return self.get_answer() """ + return self.get_answer() + def __class_getitem__(self, item): + return types.GenericAlias(self, item) + +def doc_func(): + """ + This function solves all of the world's problems: + hunger + lack of Python + war + """ + +def nodoc_func(): + pass + + +list_alias1 = typing.List[int] +list_alias2 = list[int] +c_alias = C[int] +type_union1 = typing.Union[int, str] +type_union2 = int | str |