-
Notifications
You must be signed in to change notification settings - Fork 6
GreenHouse to TeamTailor migration #115
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 2 commits
232d3b8
ce80272
f07b7f4
47dd49b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||||||||
import uuid | ||||||||||||
from typing import Annotated, Dict | ||||||||||||
from typing import Annotated, Any, Dict | ||||||||||||
|
||||||||||||
from fastapi import Depends, HTTPException, Query, status | ||||||||||||
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer | ||||||||||||
|
@@ -14,13 +14,15 @@ | |||||||||||
|
||||||||||||
security_scheme = HTTPBearer() | ||||||||||||
|
||||||||||||
|
||||||||||||
def get_auth_provider() -> AuthProvider: | ||||||||||||
return MockAuthProvider() | ||||||||||||
|
||||||||||||
|
||||||||||||
async def get_access_token( | ||||||||||||
token: Annotated[HTTPAuthorizationCredentials, Depends(security_scheme)], | ||||||||||||
auth_provider: Annotated[AuthProvider, Depends(get_auth_provider)] | ||||||||||||
) -> Dict[str, any] | HTTPException: | ||||||||||||
auth_provider: Annotated[AuthProvider, Depends(get_auth_provider)], | ||||||||||||
) -> Dict[str, Any] | HTTPException: | ||||||||||||
try: | ||||||||||||
payload = jwt.decode( | ||||||||||||
token.credentials, "", algorithms=["HS256"], options={"verify_signature": False} | ||||||||||||
|
@@ -42,19 +44,20 @@ async def get_access_token( | |||||||||||
) from e | ||||||||||||
return access_token | ||||||||||||
|
||||||||||||
|
||||||||||||
async def get_current_user( | ||||||||||||
access_token: Annotated[Dict[str, any], Depends(get_access_token)], | ||||||||||||
access_token: Annotated[Dict[str, Any], Depends(get_access_token)], | ||||||||||||
auth_provider: Annotated[AuthProvider, Depends(get_auth_provider)], | ||||||||||||
impersonation_sub: str | None = Query(None, description="Impersonation user sub."), | ||||||||||||
) -> User | HTTPException: | ||||||||||||
user_data = auth_provider.get_user(access_token['sub']) | ||||||||||||
user_data = auth_provider.get_user(access_token["sub"]) | ||||||||||||
Comment on lines
52
to
+53
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. 🛠️ Refactor suggestion Same here: return a User, not a union with HTTPException. -) -> User | HTTPException:
+) -> User: 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||
user = User( | ||||||||||||
id=uuid.UUID(user_data['id'], version=4), | ||||||||||||
sub=user_data['sub'], | ||||||||||||
username=user_data['username'], | ||||||||||||
is_premium=user_data.get('is_premium', False), | ||||||||||||
email=user_data.get('email', ""), | ||||||||||||
groups=user_data.get('groups', []), | ||||||||||||
id=uuid.UUID(user_data["id"], version=4), | ||||||||||||
sub=user_data["sub"], | ||||||||||||
username=user_data["username"], | ||||||||||||
is_premium=user_data.get("is_premium", False), | ||||||||||||
email=user_data.get("email", ""), | ||||||||||||
groups=user_data.get("groups", []), | ||||||||||||
) | ||||||||||||
if not settings.auth_provider_enabled: | ||||||||||||
return user | ||||||||||||
|
@@ -63,4 +66,3 @@ async def get_current_user( | |||||||||||
return user | ||||||||||||
except Exception as e: | ||||||||||||
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e)) | ||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
from typing import Any, List, Dict | ||
from typing import Any, Dict, List | ||
|
||
from .generic_auth_provider import AuthProvider | ||
|
||
|
||
class MockAuthProvider(AuthProvider): | ||
def authenticate_user(self, token: str) -> Dict[str, Any]: | ||
return { | ||
"sub": "123e4567-e89b-12d3-a456-426614174000", | ||
"username": "mockuser", | ||
"is_premium": True, | ||
"email": "[email protected]", | ||
"groups": ["user", "admin"] | ||
"groups": ["user", "admin"], | ||
} | ||
|
||
def get_user(self, user_id: str) -> Dict[str, Any]: | ||
|
@@ -18,13 +20,13 @@ def get_user(self, user_id: str) -> Dict[str, Any]: | |
"username": "mockuser", | ||
"is_premium": True, | ||
"email": "[email protected]", | ||
"groups": ["user", "admin"] | ||
"groups": ["user", "admin"], | ||
} | ||
|
||
def create_user(self, email: str, attributes: List[Dict[str, Any]], groups: List[str]) -> Dict[str, Any]: | ||
return { | ||
"response": "User created successfully" | ||
} | ||
def create_user( | ||
self, email: str, attributes: List[Dict[str, Any]], groups: List[str] | ||
) -> Dict[str, Any]: | ||
return {"response": "User created successfully"} | ||
|
||
def update_user(self, email: str, attributes: List[Dict[str, Any]], groups: List[str]) -> None: | ||
pass | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,6 +7,7 @@ class AppSettings(BaseSettings): | |||||||||||||||||||||||||||||||||||||||||||
version: str = Field(alias="APP_VERSION", default="0.1.2") | ||||||||||||||||||||||||||||||||||||||||||||
stage: str = Field(alias="STAGE", default="local") | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
class EmailSettings(BaseSettings): | ||||||||||||||||||||||||||||||||||||||||||||
model_config = SettingsConfigDict(extra="ignore") | ||||||||||||||||||||||||||||||||||||||||||||
smtp_host: str | None = Field(alias="EMAIL_SMTP_HOST", default=None) | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -17,9 +18,19 @@ class EmailSettings(BaseSettings): | |||||||||||||||||||||||||||||||||||||||||||
to_email: str | None = Field(alias="EMAIL_TO_EMAIL", default=None) | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
class DatabaseSettings(BaseSettings): | ||||||||||||||||||||||||||||||||||||||||||||
url: str = Field(alias="DATABASE_URL", default="sqlite:///./test.db") | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
class AuthSettings(BaseSettings): | ||||||||||||||||||||||||||||||||||||||||||||
auth_provider_enabled: bool = Field(alias="AUTH_PROVIDER_ENABLED", default=False) | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+25
to
+27
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. 💡 Verification agent 🧩 Analysis chainDeduplicate AUTH_PROVIDER_ENABLED; expose a cohesive AuthSettings group. Same flag exists in AuthSettings and again at Settings; remove duplication to avoid drift. Apply: class AuthSettings(BaseSettings):
auth_provider_enabled: bool = Field(alias="AUTH_PROVIDER_ENABLED", default=False)
class Settings(BaseSettings):
app: AppSettings = AppSettings()
email: EmailSettings = EmailSettings()
- database: DatabaseSettings = DatabaseSettings()
- auth_provider_enabled: bool = Field(alias="AUTH_PROVIDER_ENABLED", default=False)
+ database: DatabaseSettings = DatabaseSettings()
+ auth: AuthSettings = AuthSettings() Search for usages to update call sites: Also applies to: 29-34 🏁 Script executed: #!/bin/bash
rg -nP '\bauth_provider_enabled\b' examples/fastapi-simple-docker-pip | sed 's/^/HIT: /' Length of output: 479 Deduplicate AUTH_PROVIDER_ENABLED and update call sites To avoid configuration drift, consolidate the Changes required:
Suggested patch: --- a/examples/fastapi-simple-docker-pip/app/config.py
+++ b/examples/fastapi-simple-docker-pip/app/config.py
@@ class AuthSettings(BaseSettings):
auth_provider_enabled: bool = Field(alias="AUTH_PROVIDER_ENABLED", default=False)
class Settings(BaseSettings):
app: AppSettings = AppSettings()
email: EmailSettings = EmailSettings()
- database: DatabaseSettings = DatabaseSettings()
- auth_provider_enabled: bool = Field(alias="AUTH_PROVIDER_ENABLED", default=False)
+ database: DatabaseSettings = DatabaseSettings()
+ auth: AuthSettings = AuthSettings() --- a/examples/fastapi-simple-docker-pip/app/auth/auth.py
+++ b/examples/fastapi-simple-docker-pip/app/auth/auth.py
@@ -59,7 +59,7 @@ def authenticate(request: Request, settings: Settings = Depends(get_settings)):
# previous logic
- if not settings.auth_provider_enabled:
+ if not settings.auth.auth_provider_enabled:
raise HTTPException(status_code=403, detail="Auth provider disabled")
# continue... • Verify there are no other references to 📝 Committable suggestion
Suggested change
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
class Settings(BaseSettings): | ||||||||||||||||||||||||||||||||||||||||||||
app: AppSettings = AppSettings() | ||||||||||||||||||||||||||||||||||||||||||||
email: EmailSettings = EmailSettings() | ||||||||||||||||||||||||||||||||||||||||||||
database: DatabaseSettings = DatabaseSettings() | ||||||||||||||||||||||||||||||||||||||||||||
auth_provider_enabled: bool = Field(alias="AUTH_PROVIDER_ENABLED", default=False) | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
settings = Settings() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,41 @@ | ||
from uuid import UUID | ||
|
||
from app.schemas.note import NoteBase | ||
from app.schemas.note import NoteOut | ||
|
||
|
||
class NoteRepository: | ||
def __init__(self): | ||
def __init__(self) -> None: | ||
pass | ||
|
||
def get_note_by_id(self, note_id: UUID) -> NoteBase: | ||
mock_note = NoteBase( | ||
id=str(note_id), | ||
title="Mocked Note", | ||
description="This is a mocked note.", | ||
summary="summary", | ||
media_url="https://localhost", | ||
preview_image_url="https://localhost", | ||
owner_id=str(UUID("12345678-1234-5678-1234-567812345678")), | ||
created_at="2021-01-01T00:00:00", | ||
updated_at="2021-01-01T00:00:00" | ||
) | ||
|
||
def get_note_by_id(self, note_id: UUID) -> NoteOut: | ||
mock_note = NoteOut( | ||
title="Mocked Note", | ||
description="This is a mocked note.", | ||
summary="summary", | ||
media_url="https://localhost", | ||
preview_image_url="https://localhost", | ||
owner_id=str(UUID("12345678-1234-5678-1234-567812345678")), | ||
) | ||
|
||
return mock_note | ||
|
||
def get_all_notes(self) -> list[NoteBase]: | ||
def get_all_notes(self) -> list[NoteOut]: | ||
mock_note_list = [ | ||
NoteBase( | ||
id=str(UUID("12345678-1234-5678-1234-567812345678")), | ||
title="Mocked Note", | ||
description="This is a mocked note.", | ||
summary="summary", | ||
media_url="https://localhost", | ||
preview_image_url="https://localhost", | ||
owner_id=str(UUID("12345678-1234-5678-1234-567812345678")), | ||
created_at="2021-01-01T00:00:00", | ||
updated_at="2021-01-01T00:00:00" | ||
NoteOut( | ||
title="Mocked Note", | ||
description="This is a mocked note.", | ||
summary="summary", | ||
media_url="https://localhost", | ||
preview_image_url="https://localhost", | ||
owner_id=str(UUID("12345678-1234-5678-1234-567812345678")), | ||
), | ||
NoteBase( | ||
id=str(UUID("87654321-4321-8765-4321-876543218765")), | ||
title="Mocked Note", | ||
description="This is a mocked note.", | ||
summary="summary", | ||
media_url="https://localhost", | ||
preview_image_url="https://localhost", | ||
owner_id=str(UUID("12345678-1234-5678-1234-567812345678")), | ||
created_at="2021-01-01T00:00:00", | ||
updated_at="2021-01-01T00:00:00" | ||
NoteOut( | ||
title="Mocked Note", | ||
description="This is a mocked note.", | ||
summary="summary", | ||
media_url="https://localhost", | ||
preview_image_url="https://localhost", | ||
owner_id=str(UUID("87654321-4321-8765-4321-876543218765")), | ||
), | ||
] | ||
return [NoteBase.model_validate(note) for note in mock_note_list] | ||
return mock_note_list |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
from .note import NoteBase, NoteCreate, NoteOut, NoteUpdate | ||
from .sorting import Sorting | ||
from .user import User | ||
|
||
__all__ = [ | ||
"NoteBase", | ||
"NoteCreate", | ||
"NoteOut", | ||
"NoteUpdate", | ||
"Sorting", | ||
"User", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from typing import List, Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class Sorting(BaseModel): | ||
sort_by: Optional[List[str]] = None | ||
sort_order: Optional[List[str]] = None |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,13 @@ | ||||||||||||||||||||||||||||||||||
from typing import List | ||||||||||||||||||||||||||||||||||
from uuid import UUID | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
from pydantic import BaseModel | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
class User(BaseModel): | ||||||||||||||||||||||||||||||||||
id: UUID | ||||||||||||||||||||||||||||||||||
sub: str | ||||||||||||||||||||||||||||||||||
username: str | ||||||||||||||||||||||||||||||||||
is_premium: bool = False | ||||||||||||||||||||||||||||||||||
email: str = "" | ||||||||||||||||||||||||||||||||||
groups: List[str] = [] | ||||||||||||||||||||||||||||||||||
Comment on lines
+7
to
+13
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. 🛠️ Refactor suggestion Avoid mutable default for lists and validate email type. Use Field(default_factory=list) and EmailStr. This prevents shared mutable defaults and enforces email format. -from pydantic import BaseModel
+from pydantic import BaseModel, Field, EmailStr
@@
class User(BaseModel):
id: UUID
sub: str
username: str
is_premium: bool = False
- email: str = ""
- groups: List[str] = []
+ email: EmailStr | None = None
+ groups: List[str] = Field(default_factory=list) 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from typing import AsyncGenerator | ||
|
||
import pytest | ||
from fastapi import status | ||
from httpx import AsyncClient | ||
|
@@ -6,21 +8,24 @@ | |
|
||
|
||
@pytest.fixture | ||
async def client(): | ||
async with AsyncClient(app=app, base_url="http://test") as ac: | ||
async def client() -> AsyncGenerator[AsyncClient, None]: | ||
async with AsyncClient(base_url="http://test") as ac: | ||
yield ac | ||
Comment on lines
+11
to
13
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. Fixture no longer mounts the ASGI app; requests won’t reach FastAPI Without an ASGI transport (or Apply: -from httpx import AsyncClient
+from httpx import AsyncClient, ASGITransport
@@
-async def client() -> AsyncGenerator[AsyncClient, None]:
- async with AsyncClient(base_url="http://test") as ac:
+async def client() -> AsyncGenerator[AsyncClient, None]:
+ transport = ASGITransport(app=app)
+ async with AsyncClient(transport=transport, base_url="http://test") as ac:
yield ac (Optional) manage startup/shutdown: # from asgi_lifespan import LifespanManager
# async with LifespanManager(app):
# ... 🤖 Prompt for AI Agents
|
||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_root_endpoint(client): # pylint: disable=redefined-outer-name | ||
async def test_root_endpoint( | ||
client: AsyncClient, # pylint: disable=redefined-outer-name | ||
) -> None: | ||
response = await client.get("/") | ||
assert response.status_code == status.HTTP_200_OK | ||
assert response.json() == {"message": "Hello World"} | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_healthcheck_endpoint(client): # pylint: disable=redefined-outer-name | ||
async def test_healthcheck_endpoint( | ||
client: AsyncClient, # pylint: disable=redefined-outer-name | ||
) -> None: | ||
response = await client.get("/healthz") | ||
assert response.status_code == status.HTTP_200_OK | ||
assert response.json() == {"status": "ok"} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||
# Bandit configuration file | ||||||
# See: https://bandit.readthedocs.io/en/latest/config.html | ||||||
|
||||||
exclude_dirs: ["tests", "legacy", "scripts/development"] | ||||||
|
||||||
skips: ["B101", "B601", "B102", "B103"] | ||||||
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. 🛠️ Refactor suggestion Over-broad skips reduce security coverage. Skipping B102/B103/B601 globally hides real issues. Keep B101 (asserts) if needed; consider removing others. Apply: -skips: ["B101", "B601", "B102", "B103"]
+skips: ["B101"] 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
# Test files and directories | ||||||
tests: ["test_*.py", "*_test.py"] | ||||||
|
||||||
Comment on lines
+9
to
+10
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. Misuse of “tests” key disables Bandit checks. In Bandit config, Apply: -# Test files and directories
-tests: ["test_*.py", "*_test.py"] 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
# Target Python versions | ||||||
target_version: ["py38", "py39", "py310", "py311", "py312"] | ||||||
|
||||||
# Output format | ||||||
output_format: json | ||||||
output_file: bandit-report.json | ||||||
|
||||||
# Verbose output | ||||||
verbose: true | ||||||
|
||||||
# Debug mode | ||||||
debug: false | ||||||
|
||||||
# Profile to use | ||||||
profile: default | ||||||
|
||||||
# Aggressive mode | ||||||
aggressive: false | ||||||
|
||||||
# Recursive directory scanning | ||||||
recursive: true | ||||||
|
||||||
# Number of processes to use | ||||||
jobs: 1 | ||||||
Comment on lines
+15
to
+34
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. 💡 Verification agent ❓ Verification inconclusiveCLI options in config may be ignored. Keys like Update CI to call: Would you like me to open a PR to adjust the CI job? 🏁 Script executed: bandit -r examples/green-house-migration -x tests,legacy,scripts/development -f json -o bandit-report.json -q Length of output: 208 CLI-only options in .bandit aren’t applied at runtime The
All other flags— Please update your CI job to invoke Bandit with those options explicitly. For example: bandit \
-r examples/green-house-migration \
-x tests,legacy,scripts/development \
-f json \
-o bandit-report.json \
-q Would you like me to open a PR to adjust the CI workflow accordingly? 🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,41 @@ | ||||||||||||||||||||||||||||||||||
# EditorConfig is awesome: https://EditorConfig.org | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# top-most EditorConfig file | ||||||||||||||||||||||||||||||||||
root = true | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# Unix-style newlines with a newline ending every file*] | ||||||||||||||||||||||||||||||||||
end_of_line = lf | ||||||||||||||||||||||||||||||||||
insert_final_newline = true | ||||||||||||||||||||||||||||||||||
charset = utf-8im_trailing_whitespace = true | ||||||||||||||||||||||||||||||||||
Comment on lines
+6
to
+9
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. Fix malformed global settings (broken comment and merged keys). Split and correct properties; current line 9 breaks both -# Unix-style newlines with a newline ending every file*]
+# Unix-style newlines with a newline at the end of every file
end_of_line = lf
insert_final_newline = true
-charset = utf-8im_trailing_whitespace = true
+charset = utf-8
+trim_trailing_whitespace = true 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# Python files | ||||||||||||||||||||||||||||||||||
[*.py] | ||||||||||||||||||||||||||||||||||
indent_style = space | ||||||||||||||||||||||||||||||||||
indent_size =4 | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# YAML files | ||||||||||||||||||||||||||||||||||
[*.[object Object]yml,yaml}] | ||||||||||||||||||||||||||||||||||
indent_style = space | ||||||||||||||||||||||||||||||||||
indent_size =2 | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
Comment on lines
+17
to
+20
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. YAML section selector is corrupted. Pattern should match yml/yaml; current selector includes “[object Object]” and mismatched braces. -[*.[object Object]yml,yaml}]
+[*.{yml,yaml}]
indent_style = space
-indent_size =2
+indent_size = 2 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||
# JSON files | ||||||||||||||||||||||||||||||||||
[*.json] | ||||||||||||||||||||||||||||||||||
indent_style = space | ||||||||||||||||||||||||||||||||||
indent_size = 2 | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# Markdown files | ||||||||||||||||||||||||||||||||||
[*.md] | ||||||||||||||||||||||||||||||||||
trim_trailing_whitespace = false | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# JavaScript files | ||||||||||||||||||||||||||||||||||
[*.{js,jsx,ts,tsx}] | ||||||||||||||||||||||||||||||||||
indent_style = space | ||||||||||||||||||||||||||||||||||
indent_size =2 | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# HTML files | ||||||||||||||||||||||||||||||||||
[*.html] | ||||||||||||||||||||||||||||||||||
indent_style = space | ||||||||||||||||||||||||||||||||||
indent_size = 2# CSS files | ||||||||||||||||||||||||||||||||||
[*.css] | ||||||||||||||||||||||||||||||||||
indent_style = space | ||||||||||||||||||||||||||||||||||
indent_size = 2 | ||||||||||||||||||||||||||||||||||
Comment on lines
+35
to
+41
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. Split HTML/CSS blocks; current line merges a value and a comment. As written, [*.html]
indent_style = space
-indent_size = 2# CSS files
-[*.css]
-indent_style = space
-indent_size = 2
+indent_size = 2
+
+# CSS files
+[*.css]
+indent_style = space
+indent_size = 2 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
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
Don’t include HTTPException in return type; dependencies should return data or raise.
The function always returns a dict or raises. Narrow the typing.
📝 Committable suggestion
🤖 Prompt for AI Agents