-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
379abf7
commit 2e12c6d
Showing
9 changed files
with
100 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from .gemini_analyzer import CodeAnalyzer | ||
__all__ = [ | ||
'CodeAnalyzer' | ||
] | ||
|
||
__all__ = ["CodeAnalyzer"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
import os | ||
import streamlit as st | ||
from typing_extensions import TypedDict | ||
|
||
|
||
class AnalyzerConfigs: | ||
''' | ||
""" | ||
This class contains configuration settings for the CodeAnalyzer class. | ||
''' | ||
""" | ||
|
||
gemini_models: list = [ | ||
"gemini-1.5-flash", | ||
"gemini-1.5-pro", #INFO : https://ai.google.dev/gemini-api/docs/json-mode?lang=python | ||
"gemini-1.5-flash", | ||
"gemini-1.5-pro", # INFO : https://ai.google.dev/gemini-api/docs/json-mode?lang=python | ||
] | ||
famous_languages: list = [ | ||
"Python", | ||
"Java", | ||
"JavaScript", | ||
"C++", | ||
"C#", | ||
"Ruby", | ||
"Go", | ||
"Swift", | ||
"Rust", | ||
] | ||
famous_languages: list = ["Python", "Java", "JavaScript", "C++", "C#", "Ruby", "Go", "Swift", "Rust"] | ||
genai_api_key: str = st.secrets["GENAI_API_KEY"] | ||
style_guides: dict = { | ||
'google style': 'https://google.github.io/styleguide/pyguide.html', | ||
'pep8': 'https://pep8.org/' | ||
"google style": "https://google.github.io/styleguide/pyguide.html", | ||
"pep8": "https://pep8.org/", | ||
} | ||
|
||
|
||
|
||
class ResponseData(TypedDict): | ||
''' | ||
""" | ||
For schema based responses like `JSON` | ||
''' | ||
""" | ||
|
||
line: int | ||
message: str | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
def greet(name): | ||
"""Greets the person with the given name.""" | ||
"""Greets the person with the given name.""" | ||
|
||
print("Hello,", name) | ||
|
||
print("Hello,", name) | ||
|
||
greet("Alice") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
def calculate_sum( a , b): # Intentional spacing issues | ||
def calculate_sum(a, b): # Intentional spacing issues | ||
"""This function calculates the sum of two numbers.""" | ||
result=a+b | ||
return result # Incorrect indentation | ||
result = a + b | ||
|
||
|
||
return result # Incorrect indentation | ||
|
||
print(calculate_sum(10, 5)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters