File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
osa_tool/operations/codebase/docstring_generation Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,8 @@ async def generate_method_documentation(
286286 f"- Method Name: { method_details ['method_name' ]} \n \n "
287287 "Method source code: You are given only the body of a single method, without its signature. "
288288 "All visible code, including any inner functions or nested logic, belongs to this single method. "
289- "Do not write separate docstrings for inner functions — they are part of the main method's logic.\n "
289+ "Do NOT write separate docstrings for inner functions — they are part of the main method's logic.\n "
290+ "Do NOT repeat the function signature or decorators.\n "
290291 "```\n "
291292 f"{ method_details ['source_code' ]} \n "
292293 "```\n \n "
@@ -368,6 +369,7 @@ async def update_method_documentation(
368369 f"The main idea of the project (for context only): { self .main_idea } \n \n "
369370 "Return only the updated docstring.\n "
370371 "DO NOT return code.\n "
372+ "Do NOT repeat the function signature or decorators.\n "
371373 "DO NOT return other documentation sections.\n "
372374 "Return only the docstring without any quotation marks.\n "
373375 )
Original file line number Diff line number Diff line change 77 IndentedBlock ,
88)
99from typing import Sequence
10- import json
1110
1211
1312class DocstringTransformer (CSTTransformer ):
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ async def test_generate_method_documentation(mock_config_manager):
260260 docstring = await docgen .generate_method_documentation (method_details , semaphore )
261261
262262 # Assert
263- assert docstring == ' Generated docstring'
263+ assert docstring == " Generated docstring"
264264 docgen .model_handler .async_request .assert_called_once ()
265265
266266
@@ -285,7 +285,7 @@ async def test_update_method_documentation(mock_config_manager):
285285 updated_doc = await docgen .update_method_documentation (method_details , semaphore )
286286
287287 # Assert
288- assert updated_doc == ' Updated docstring'
288+ assert updated_doc == " Updated docstring"
289289 docgen .model_handler .async_request .assert_called_once ()
290290
291291
You can’t perform that action at this time.
0 commit comments