+
+ +
+

codergpt.bug_finder package

+
+

Submodules

+
+
+

codergpt.bug_finder.bug_finder module

+

Bug-finder class for the package.

+
+
+class codergpt.bug_finder.bug_finder.BugFinder(chain)
+

Bases: object

+

Bug-finder class for the package.

+
+
+find_bugs(code, function=None, classname=None, language=None)
+

Find bugs in the given code.

+
+
Parameters:
+
    +
  • code (str) – The code to find bugs in.

  • +
  • function (Optional[str]) – The name of the function to find bugs in. Default is None.

  • +
  • classname (Optional[str]) – The name of the class to find bugs in. Default is None.

  • +
  • language (Optional[str]) – The language of the code. Default is None.

  • +
+
+
+
+ +
+
+fix_bugs(filename, code, function=None, classname=None, language=None, outfile=None)
+

Fix bugs in the given code.

+
+
Parameters:
+
    +
  • code (str) – The code to fix bugs in.

  • +
  • function (Optional[str]) – The name of the function to fix bugs in. Default is None.

  • +
  • classname (Optional[str]) – The name of the class to fix bugs

  • +
+
+
Return type:
+

None

+
+
+

:param outfile:Path for output file with bug-fix code. Default is None.

+
+ +
+ +
+
+

Module contents

+

Bug-finder module for the package.

+
+
+class codergpt.bug_finder.BugFinder(chain)
+

Bases: object

+

Bug-finder class for the package.

+
+
+find_bugs(code, function=None, classname=None, language=None)
+

Find bugs in the given code.

+
+
Parameters:
+
    +
  • code (str) – The code to find bugs in.

  • +
  • function (Optional[str]) – The name of the function to find bugs in. Default is None.

  • +
  • classname (Optional[str]) – The name of the class to find bugs in. Default is None.

  • +
  • language (Optional[str]) – The language of the code. Default is None.

  • +
+
+
+
+ +
+
+fix_bugs(filename, code, function=None, classname=None, language=None, outfile=None)
+

Fix bugs in the given code.

+
+
Parameters:
+
    +
  • code (str) – The code to fix bugs in.

  • +
  • function (Optional[str]) – The name of the function to fix bugs in. Default is None.

  • +
  • classname (Optional[str]) – The name of the class to fix bugs

  • +
+
+
Return type:
+

None

+
+
+

:param outfile:Path for output file with bug-fix code. Default is None.

+
+ +
+ +
+
+ + +
+