mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-13 03:15:17 +00:00
Add Docs
This commit is contained in:
parent
96824aa9e2
commit
663ae92bdf
1 changed files with 9 additions and 0 deletions
|
|
@ -134,6 +134,10 @@ class PRAddDocs:
|
|||
self.git_provider.publish_code_suggestions([code_suggestion])
|
||||
|
||||
def dedent_code(self, relevant_file, relevant_lines_start, new_code_snippet, add_original_line=False):
|
||||
"""
|
||||
This method dedents the code snippet to match the original code's indentation.
|
||||
It also has the option to add the original line of code to the new code snippet.
|
||||
"""
|
||||
try: # dedent code snippet
|
||||
self.diff_files = self.git_provider.diff_files if self.git_provider.diff_files \
|
||||
else self.git_provider.get_diff_files()
|
||||
|
|
@ -183,6 +187,11 @@ class PRAddDocs:
|
|||
return data
|
||||
|
||||
|
||||
"""
|
||||
This function determines the type of documentation to generate based on the main language of the PR.
|
||||
It supports Javadocs for Java, Docstrings for Python, Lisp, and Clojure, JSdocs for JavaScript and TypeScript,
|
||||
and Doxygen for C++. For other languages, it defaults to generating generic Docs.
|
||||
"""
|
||||
def get_docs_for_language(language, style):
|
||||
language = language.lower()
|
||||
if language == 'java':
|
||||
|
|
|
|||
Loading…
Reference in a new issue