Skip to content

Commit 9befb58

Browse files
Add more detail to the comment for GetMessageClassesForFiles
Adds more clarity to the docstring to better explain the expected return value. PiperOrigin-RevId: 733132344
1 parent 06bb281 commit 9befb58

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

python/google/protobuf/message_factory.py

+16
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ def GetMessageClassesForFiles(files, pool):
5656
This will find and resolve dependencies, failing if the descriptor
5757
pool cannot satisfy them.
5858
59+
This will not return the classes for nested types within those classes, for
60+
those, use GetMessageClass() on the nested types within their containing
61+
messages.
62+
63+
For example, for the message:
64+
65+
message NestedTypeMessage {
66+
message NestedType {
67+
string data = 1;
68+
}
69+
NestedType nested = 1;
70+
}
71+
72+
NestedTypeMessage will be in the result, but not
73+
NestedTypeMessage.NestedType.
74+
5975
Args:
6076
files: The file names to extract messages from.
6177
pool: The descriptor pool to find the files including the dependent files.

0 commit comments

Comments
 (0)