Class PythonReviewer

java.lang.Object
org.machanism.machai.gw.reviewer.PythonReviewer
All Implemented Interfaces:
Reviewer

public class PythonReviewer extends Object implements Reviewer
Reviewer implementation for Python source files (.py).

Guidance may appear in either single-line comments (#) or in triple-quoted strings that contain the @guidance tag.

  • Constructor Details

    • PythonReviewer

      public PythonReviewer()
  • Method Details

    • getSupportedFileExtensions

      public String[] getSupportedFileExtensions()
      Description copied from interface: Reviewer
      Returns the file extensions (without the dot) that this reviewer can process.
      Specified by:
      getSupportedFileExtensions in interface Reviewer
      Returns:
      supported file extensions
    • perform

      public String perform(File projectDir, File guidancesFile) throws IOException
      Description copied from interface: Reviewer
      Reviews a file and returns a formatted fragment (often including file content and/or extracted guidance) for use by the Ghostwriter pipeline.
      Specified by:
      perform in interface Reviewer
      Parameters:
      projectDir - the project root directory used to compute related paths for context
      guidancesFile - the file to analyze
      Returns:
      a formatted prompt fragment, or null when no relevant guidance is present
      Throws:
      IOException - if an error occurs reading the file