Skip to content

Commit

Permalink
Updated docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Feb 14, 2024
1 parent a7a1594 commit 423a13f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/codergpt/commenter/commenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def comment(self, code: str, filename: str, overwrite: bool = False, language: O
:param code: The string containing the code to be commented.
:param filename: The original filename of the code file.
:param overwrite: A boolean indicating whether to overwrite the original file. Default is False.
:param language: Coding language of the file, defaults to None
"""
comment_template = None
if language and language in TEMPLATES.keys():
Expand All @@ -41,7 +42,7 @@ def comment(self, code: str, filename: str, overwrite: bool = False, language: O
"input": f"Rewrite and return this {language} code with\
comments: \n{code}\n"
f"Use template {comment_template} as reference to render the code comments."
"Remember, everything in the template are placeholders."
"Everything in the template are placeholders."
"Return just the code block since all this will be a file."
}
else:
Expand Down
5 changes: 3 additions & 2 deletions src/codergpt/documenter/documenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ def document(
"""
Document the contents of the code file by invoking the runnable chain.
:param filename: filename of the code file.
:param code: The string containing the code to be documented.
:param function: The name of the function to document. Default is None.
:param classname: The name of the class to document
:param language: Coding language of the file, defaults to None
:param outfile: Destination filepath, defaults to None
"""
document_template = None
if language and language in TEMPLATES.keys():
Expand Down

0 comments on commit 423a13f

Please sign in to comment.