From 9434037e2e51cb7bd0e5778305ceeadab16943b1 Mon Sep 17 00:00:00 2001 From: Jonah Jeleniewski Date: Mon, 26 Feb 2024 21:07:53 +1100 Subject: [PATCH] Fix docstring generation for generated packet types --- protocol_code_generator/generate/code_generator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocol_code_generator/generate/code_generator.py b/protocol_code_generator/generate/code_generator.py index 31c2fcc..6d76f56 100644 --- a/protocol_code_generator/generate/code_generator.py +++ b/protocol_code_generator/generate/code_generator.py @@ -275,6 +275,10 @@ def _generate_packet(self, protocol_packet): .unindent() ) + object_code_generator.data.docstring.add_code_block( + generate_docstring(get_comment(protocol_packet)) + ) + code_block = object_code_generator.code code_block.add_import("Packet", "eolib.protocol.net.packet") code_block.add_import("PacketFamily", "eolib.protocol._generated.net.packet_family")