Skip to content

Commit 43a16ac

Browse files
nicoroeserJohnVillalovos
authored andcommitted
docs(faq): correct the attribute fetching example
There is an example about object attributes in the FAQ. It shows how to properly fetch all attributes of all projects, by using list() followed by a get(id) call. Unfortunately this example used a wrong variable name, which caused it not to work and which could have made it slightly confusing to readers. This commit fixes that, by changing the variable name. Now the example uses one variable for two Python objects. As they correspond to the same GitLab object and the intended behavior is to obtain that very object, just with all attributes, this is fine and is probably what readers will find most useful in this context.
1 parent bdc155b commit 43a16ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To retrieve an object with all attributes, use a ``get()`` call.
5858

5959
Example with projects::
6060

61-
for projects in gl.projects.list():
61+
for project in gl.projects.list():
6262
# Retrieve project object with all attributes
6363
project = gl.projects.get(project.id)
6464

0 commit comments

Comments
 (0)