Package org.machanism.machai.gw.reviewer
Class PythonReviewer
java.lang.Object
org.machanism.machai.gw.reviewer.PythonReviewer
- All Implemented Interfaces:
Reviewer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceBundleResource bundle containing prompt templates for reviewed files. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
promptBundle
Resource bundle containing prompt templates for reviewed files.
-
-
Constructor Details
-
PythonReviewer
public PythonReviewer()
-
-
Method Details
-
getSupportedFileExtensions
Description copied from interface:ReviewerReturns the file extensions (without the dot) that this reviewer can process.- Specified by:
getSupportedFileExtensionsin interfaceReviewer- Returns:
- an array containing
"py"
-
perform
Reviews a Python file for line-comment or triple-quoted guidance.- Specified by:
performin interfaceReviewer- Parameters:
projectDir- the project root used to compute a relative pathguidancesFile- the Python file to inspect- Returns:
- a formatted prompt, or
nullwhen no non-blank guidance is found - Throws:
IOException- if the file cannot be read
-