You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/users/navigating.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ To access an object's members, there are a few options:
41
41
42
42
```pycon
43
43
>>> import griffe
44
-
>>> markdown = griffe.load("markdown")
44
+
>>> markdown = griffelib.load("markdown")
45
45
>>> markdown.members["Markdown"]
46
46
Alias('Markdown', 'markdown.core.Markdown')
47
47
>>> markdown.members["core"].members["Markdown"]
@@ -54,7 +54,7 @@ To access an object's members, there are a few options:
54
54
55
55
```pycon
56
56
>>> import griffe
57
-
>>> markdown = griffe.load("markdown")
57
+
>>> markdown = griffelib.load("markdown")
58
58
>>> markdown["core"]["Markdown"] # chained access
59
59
Class('Markdown', 46, 451)
60
60
>>> markdown["core.Markdown"] # merged access
@@ -65,7 +65,7 @@ To access an object's members, there are a few options:
65
65
66
66
```pycon
67
67
>>> import griffe
68
-
>>> markdown = griffe.load("markdown")
68
+
>>> markdown = griffelib.load("markdown")
69
69
>>> markdown[("core", "Markdown")] # tuple access
70
70
Class('Markdown', 46, 451)
71
71
>>> # Due to the nature of the subscript syntax,
@@ -78,7 +78,7 @@ To access an object's members, there are a few options:
78
78
79
79
```pycon
80
80
>>> import griffe
81
-
>>> markdown = griffe.load("markdown")
81
+
>>> markdown = griffelib.load("markdown")
82
82
>>> markdown.get_member("core.Markdown")
83
83
Class('Markdown', 46, 451)
84
84
```
@@ -122,7 +122,7 @@ If a base class cannot be resolved during computation of inherited members, Grif
122
122
123
123
If you want to access all members at once (both declared and inherited), use the [`all_members`][griffe.Object.all_members] attribute. If you want to access only declared members, use the [`members`][griffe.Object] attribute.
124
124
125
-
Accessing the [`attributes`][griffe.Object.attributes], [`functions`][griffe.Object.functions], [`classes`][griffe.Object.classes], [`type_aliases`][griffe.Object.type_aliases] or [`modules`][griffe.Object.modules] attributes will trigger inheritance computation, so make sure to only access them once everything is loaded by Griffe. Don't try to access inherited members in extensions, while visiting or inspecting modules.
125
+
Accessing the [`attributes`][griffe.Object.attributes], [`functions`][griffe.Object.functions], [`classes`][griffe.Object.classes], [`type_aliases`][griffe.Object.type_aliases] or [`modules`][griffe.Object.modules] attributes will trigger inheritance computation, so make sure to only access them once everything is loaded by griffelib. Don't try to access inherited members in extensions, while visiting or inspecting modules.
126
126
127
127
#### Limitations
128
128
@@ -254,7 +254,7 @@ from pkg2 import A as B
254
254
255
255
```pycon
256
256
>>> import griffe
257
-
>>> B =griffe.load("pkg1.B")
257
+
>>> B =griffelib.load("pkg1.B")
258
258
>>> B.path
259
259
'pkg1.B'
260
260
>>> B.canonical_path
@@ -339,13 +339,13 @@ Each object has an optional [`docstring`][griffe.Object.docstring] attached to i
339
339
340
340
Docstrings can be parsed against several [docstring-styles](../../reference/docstrings.md), which are micro-formats that allow documenting things such as parameters, returned values, raised exceptions, etc..
341
341
342
-
When loading a package, it is possible to specify the docstring style to attach to every docstring (see the `docstring_parser` parameter of [`griffe.load`][griffe.load]). Accessing the [`parsed`][griffe.Docstring.parsed] field of a docstring will use this style to parse the docstring andreturn a list of [docstring sections][advanced-api-sections]. Each section has a `value` whose shape depends on the section kind. For example, parameter sections have a list of parameter representations as value, while a text section only has a string as value.
342
+
When loading a package, it is possible to specify the docstring style to attach to every docstring (see the `docstring_parser` parameter of [`griffelib.load`][griffe.load]). Accessing the [`parsed`][griffe.Docstring.parsed] field of a docstring will use this style to parse the docstring andreturn a list of [docstring sections][advanced-api-sections]. Each section has a `value` whose shape depends on the section kind. For example, parameter sections have a list of parameter representations as value, while a text section only has a string as value.
343
343
344
344
After a package is loaded, it is still possible to change the style used for specific docstrings by either overriding their [`parser`][griffe.Docstring.parser] and [`parser_options`][griffe.Docstring.parser_options] attributes, or by calling their [`parse()`][griffe.Docstring.parse] method with a different style:
0 commit comments