| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,106 +58,115 @@ of these classes. | |||
| 58 | 58 | ||
| 59 | 59 | Function Objects | |
| 60 | 60 | ---------------- | |
| 61 | - Class :class:`Function` instances describe functions defined by def | ||
| 62 | - statements. They have the following attributes: | ||
| 63 | 61 | ||
| 62 | + .. class:: Function | ||
| 64 | 63 | ||
| 65 | - .. attribute:: Function.file | ||
| 64 | + Class :class:`!Function` instances describe functions defined by def | ||
| 65 | + statements. They have the following attributes: | ||
| 66 | 66 | ||
| 67 | - Name of the file in which the function is defined. | ||
| 68 | 67 | ||
| 68 | + .. attribute:: file | ||
| 69 | 69 | ||
| 70 | - .. attribute:: Function.module | ||
| 70 | + Name of the file in which the function is defined. | ||
| 71 | 71 | ||
| 72 | - The name of the module defining the function described. | ||
| 73 | 72 | ||
| 73 | + .. attribute:: module | ||
| 74 | 74 | ||
| 75 | - .. attribute:: Function.name | ||
| 75 | + The name of the module defining the function described. | ||
| 76 | 76 | ||
| 77 | - The name of the function. | ||
| 78 | 77 | ||
| 78 | + .. attribute:: name | ||
| 79 | 79 | ||
| 80 | - .. attribute:: Function.lineno | ||
| 80 | + The name of the function. | ||
| 81 | 81 | ||
| 82 | - The line number in the file where the definition starts. | ||
| 83 | 82 | ||
| 83 | + .. attribute:: lineno | ||
| 84 | 84 | ||
| 85 | - .. attribute:: Function.parent | ||
| 85 | + The line number in the file where the definition starts. | ||
| 86 | 86 | ||
| 87 | - For top-level functions, None. For nested functions, the parent. | ||
| 88 | 87 | ||
| 89 | - .. versionadded:: 3.7 | ||
| 88 | + .. attribute:: parent | ||
| 90 | 89 | ||
| 90 | + For top-level functions, ``None``. For nested functions, the parent. | ||
| 91 | 91 | ||
| 92 | - .. attribute:: Function.children | ||
| 92 | + .. versionadded:: 3.7 | ||
| 93 | 93 | ||
| 94 | - A dictionary mapping names to descriptors for nested functions and | ||
| 95 | - classes. | ||
| 96 | 94 | ||
| 97 | - .. versionadded:: 3.7 | ||
| 95 | + .. attribute:: children | ||
| 98 | 96 | ||
| 97 | + A :class:`dictionary <dict>` mapping names to descriptors for nested functions and | ||
| 98 | + classes. | ||
| 99 | 99 | ||
| 100 | - .. attribute:: Function.is_async | ||
| 100 | + .. versionadded:: 3.7 | ||
| 101 | 101 | ||
| 102 | - ``True`` for functions that are defined with the ``async`` prefix, ``False`` otherwise. | ||
| 103 | 102 | ||
| 104 | - .. versionadded:: 3.10 | ||
| 103 | + .. attribute:: is_async | ||
| 104 | + | ||
| 105 | + ``True`` for functions that are defined with the | ||
| 106 | + :keyword:`async <async def>` prefix, ``False`` otherwise. | ||
| 107 | + | ||
| 108 | + .. versionadded:: 3.10 | ||
| 105 | 109 | ||
| 106 | 110 | ||
| 107 | 111 | .. _pyclbr-class-objects: | |
| 108 | 112 | ||
| 109 | 113 | Class Objects | |
| 110 | 114 | ------------- | |
| 111 | - Class :class:`Class` instances describe classes defined by class | ||
| 112 | - statements. They have the same attributes as Functions and two more. | ||
| 115 | + | ||
| 116 | + .. class:: Class | ||
| 117 | + | ||
| 118 | + Class :class:`!Class` instances describe classes defined by class | ||
| 119 | + statements. They have the same attributes as :class:`Functions <Function>` | ||
| 120 | + and two more. | ||
| 113 | 121 | ||
| 114 | 122 | ||
| 115 | - .. attribute:: Class.file | ||
| 123 | + .. attribute:: file | ||
| 116 | 124 | ||
| 117 | - Name of the file in which the class is defined. | ||
| 125 | + Name of the file in which the class is defined. | ||
| 118 | 126 | ||
| 119 | 127 | ||
| 120 | - .. attribute:: Class.module | ||
| 128 | + .. attribute:: module | ||
| 121 | 129 | ||
| 122 | - The name of the module defining the class described. | ||
| 130 | + The name of the module defining the class described. | ||
| 123 | 131 | ||
| 124 | 132 | ||
| 125 | - .. attribute:: Class.name | ||
| 133 | + .. attribute:: name | ||
| 126 | 134 | ||
| 127 | - The name of the class. | ||
| 135 | + The name of the class. | ||
| 128 | 136 | ||
| 129 | 137 | ||
| 130 | - .. attribute:: Class.lineno | ||
| 138 | + .. attribute:: lineno | ||
| 131 | 139 | ||
| 132 | - The line number in the file where the definition starts. | ||
| 140 | + The line number in the file where the definition starts. | ||
| 133 | 141 | ||
| 134 | 142 | ||
| 135 | - .. attribute:: Class.parent | ||
| 143 | + .. attribute:: parent | ||
| 136 | 144 | ||
| 137 | - For top-level classes, None. For nested classes, the parent. | ||
| 145 | + For top-level classes, None. For nested classes, the parent. | ||
| 138 | 146 | ||
| 139 | - .. versionadded:: 3.7 | ||
| 147 | + .. versionadded:: 3.7 | ||
| 140 | 148 | ||
| 141 | 149 | ||
| 142 | - .. attribute:: Class.children | ||
| 150 | + .. attribute:: children | ||
| 143 | 151 | ||
| 144 | - A dictionary mapping names to descriptors for nested functions and | ||
| 145 | - classes. | ||
| 152 | + A dictionary mapping names to descriptors for nested functions and | ||
| 153 | + classes. | ||
| 146 | 154 | ||
| 147 | - .. versionadded:: 3.7 | ||
| 155 | + .. versionadded:: 3.7 | ||
| 148 | 156 | ||
| 149 | 157 | ||
| 150 | - .. attribute:: Class.super | ||
| 158 | + .. attribute:: super | ||
| 151 | 159 | ||
| 152 | - A list of :class:`Class` objects which describe the immediate base | ||
| 153 | - classes of the class being described. Classes which are named as | ||
| 154 | - superclasses but which are not discoverable by :func:`readmodule_ex` | ||
| 155 | - are listed as a string with the class name instead of as | ||
| 156 | - :class:`Class` objects. | ||
| 160 | + A list of :class:`!Class` objects which describe the immediate base | ||
| 161 | + classes of the class being described. Classes which are named as | ||
| 162 | + superclasses but which are not discoverable by :func:`readmodule_ex` | ||
| 163 | + are listed as a string with the class name instead of as | ||
| 164 | + :class:`!Class` objects. | ||
| 157 | 165 | ||
| 158 | 166 | ||
| 159 | - .. attribute:: Class.methods | ||
| 167 | + .. attribute:: methods | ||
| 160 | 168 | ||
| 161 | - A dictionary mapping method names to line numbers. This can be | ||
| 162 | - derived from the newer children dictionary, but remains for | ||
| 163 | - back-compatibility. | ||
| 169 | + A :class:`dictionary <dict>` mapping method names to line numbers. | ||
| 170 | + This can be derived from the newer :attr:`children` dictionary, | ||
| 171 | + but remains for | ||
| 172 | + back-compatibility. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,6 @@ Doc/library/pickletools.rst | |||
| 70 | 70 | Doc/library/platform.rst | |
| 71 | 71 | Doc/library/plistlib.rst | |
| 72 | 72 | Doc/library/profile.rst | |
| 73 | - Doc/library/pyclbr.rst | ||
| 74 | 73 | Doc/library/pydoc.rst | |
| 75 | 74 | Doc/library/pyexpat.rst | |
| 76 | 75 | Doc/library/readline.rst | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1315,8 +1315,8 @@ pyclbr | |||
| 1315 | 1315 | ------ | |
| 1316 | 1316 | ||
| 1317 | 1317 | Add an ``end_lineno`` attribute to the ``Function`` and ``Class`` | |
| 1318 | - objects in the tree returned by :func:`pyclbr.readline` and | ||
| 1319 | - :func:`pyclbr.readline_ex`. It matches the existing (start) ``lineno``. | ||
| 1318 | + objects in the tree returned by :func:`pyclbr.readmodule` and | ||
| 1319 | + :func:`pyclbr.readmodule_ex`. It matches the existing (start) ``lineno``. | ||
| 1320 | 1320 | (Contributed by Aviral Srivastava in :issue:`38307`.) | |
| 1321 | 1321 | ||
| 1322 | 1322 | shelve | |
| Back | FazBrowse Home | New Git URL |
0 commit comments