-
Notifications
You must be signed in to change notification settings - Fork 49
Refactor UI components for dark mode support and improve styling #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,8 +1,8 @@ | ||||||||||||
from fastapi import APIRouter, Depends, HTTPException | ||||||||||||
from sqlalchemy.ext.asyncio import AsyncSession | ||||||||||||
from sqlalchemy.future import select | ||||||||||||
from db.db import AsyncSessionLocal | ||||||||||||
from models.models import ( | ||||||||||||
from app.db.db import AsyncSessionLocal | ||||||||||||
from app.models.models import ( | ||||||||||||
User, AudienceInsights, Sponsorship, UserPost, | ||||||||||||
SponsorshipApplication, SponsorshipPayment, Collaboration | ||||||||||||
) | ||||||||||||
Comment on lines
+4
to
8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unused SQLAlchemy imports. The static analysis tools correctly identify that all the imported SQLAlchemy-related classes and -from app.db.db import AsyncSessionLocal
-from app.models.models import (
- User, AudienceInsights, Sponsorship, UserPost,
- SponsorshipApplication, SponsorshipPayment, Collaboration
-) Also remove the unused schema imports from lines 9-12: -from schemas.schema import (
- UserCreate, AudienceInsightsCreate, SponsorshipCreate, UserPostCreate,
- SponsorshipApplicationCreate, SponsorshipPaymentCreate, CollaborationCreate
-) π Committable suggestion
Suggested change
π§° Toolsπͺ Ruff (0.11.9)4-4: Remove unused import: (F401) 6-6: Remove unused import (F401) 6-6: Remove unused import (F401) 6-6: Remove unused import (F401) 6-6: Remove unused import (F401) 7-7: Remove unused import (F401) 7-7: Remove unused import (F401) 7-7: Remove unused import (F401) πͺ Flake8 (7.2.0)[error] 4-4: 'app.db.db.AsyncSessionLocal' imported but unused (F401) [error] 5-5: 'app.models.models.User' imported but unused (F401) [error] 5-5: 'app.models.models.AudienceInsights' imported but unused (F401) [error] 5-5: 'app.models.models.Sponsorship' imported but unused (F401) [error] 5-5: 'app.models.models.UserPost' imported but unused (F401) [error] 5-5: 'app.models.models.SponsorshipApplication' imported but unused (F401) [error] 5-5: 'app.models.models.SponsorshipPayment' imported but unused (F401) [error] 5-5: 'app.models.models.Collaboration' imported but unused (F401) π€ Prompt for AI Agents
|
||||||||||||
|
@@ -22,6 +22,8 @@ | |||||||||||
load_dotenv() | ||||||||||||
url: str = os.getenv("SUPABASE_URL") | ||||||||||||
key: str = os.getenv("SUPABASE_KEY") | ||||||||||||
print(f"Supabase URL: {url}") | ||||||||||||
print(f"Supabase Key: {key}") | ||||||||||||
|
print(f"Supabase URL: {url}") | |
print(f"Supabase Key: {key}") | |
logger = logging.getLogger(__name__) | |
# Log only the fact that the env vars were loaded; never output the key itself. | |
logger.info("Supabase credentials loaded from environment variables.") |
π€ Prompt for AI Agents
In Backend/app/routes/post.py around lines 25 to 26, printing the Supabase key
directly to stdout exposes sensitive credentials and risks leakage. Remove the
print statement that outputs the Supabase key. If logging the URL is necessary,
use the logging module with an appropriate log level and avoid logging the key
entirely. Also, ensure the logging module is explicitly imported at the top of
the file if not already done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Eli4479 Please remove the print statements for the Supabase URL and Key. Logging sensitive information like this is not a good practice. This one is important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
Refactor or relocate the
sys.path
hack.The runtime path append appears after the imports, so it won't help resolve them and is fragile across environments. Consider moving this line above the imports or, better, removing it entirely by structuring the project as a proper Python package (e.g., using
setup.py
orpyproject.toml
) and running withpython -m
.Apply this diff to reorder and harden path setup:
π Committable suggestion
π€ Prompt for AI Agents