@@ -138,7 +138,7 @@ def extract_code_string_context_from_files(
138138 helpers_of_fto : dict [Path , set [FunctionSource ]],
139139 helpers_of_helpers : dict [Path , set [FunctionSource ]],
140140 project_root_path : Path ,
141- remove_docstrings : bool = False ,
141+ remove_docstrings : bool = False , # noqa: FBT001, FBT002
142142 code_context_type : CodeContextType = CodeContextType .READ_ONLY ,
143143) -> CodeString :
144144 """Extract code context from files containing target functions and their helpers.
@@ -245,7 +245,7 @@ def extract_code_markdown_context_from_files(
245245 helpers_of_fto : dict [Path , set [FunctionSource ]],
246246 helpers_of_helpers : dict [Path , set [FunctionSource ]],
247247 project_root_path : Path ,
248- remove_docstrings : bool = False ,
248+ remove_docstrings : bool = False , # noqa: FBT001, FBT002
249249 code_context_type : CodeContextType = CodeContextType .READ_ONLY ,
250250) -> CodeStringsMarkdown :
251251 """Extract code context from files containing target functions and their helpers, formatting them as markdown.
@@ -271,12 +271,12 @@ def extract_code_markdown_context_from_files(
271271 """
272272 # Rearrange to remove overlaps, so we only access each file path once
273273 helpers_of_helpers_no_overlap = defaultdict (set )
274- for file_path in helpers_of_helpers :
274+ for file_path , helper_functions in helpers_of_helpers . items () :
275275 if file_path in helpers_of_fto :
276276 # Remove duplicates within the same file path, in case a helper of helper is also a helper of fto
277277 helpers_of_helpers [file_path ] -= helpers_of_fto [file_path ]
278278 else :
279- helpers_of_helpers_no_overlap [file_path ] = helpers_of_helpers [ file_path ]
279+ helpers_of_helpers_no_overlap [file_path ] = helper_functions
280280 code_context_markdown = CodeStringsMarkdown ()
281281 # Extract code from file paths that contain fto and first degree helpers. helpers of helpers may also be included if they are in the same files
282282 for file_path , function_sources in helpers_of_fto .items ():
0 commit comments