You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_active_announcement handler'ı app.repositories.announcement.get_active_banner'ı doğrudan import edip route içinde await ediyor. Bu, api → services → repositories → models akışını kırıyor. Aynı PR'daki app/api/routes/admin/broadcast.py kuralı doğru uygulayıp servisleri kullanıyor; tutarsız olan tek nokta bu route. Beş bağımsız reviewer da aynı ihlali işaretledi.
CLAUDE.md / REVIEW.md §3.1: "api/routes/ never calls repositories directly — always goes through services/."
Öneri:app/services/announcement.py içine async def get_active_banner_service(session) ekle; route yalnızca bu servisi çağırsın ve AnnouncementRead/ActiveBannerResponse map'lemesi serviste yapılsın.
__missing__ metodu, eksik placeholder'ı olduğu gibi döndürüyor ancak hiçbir docstring taşımıyor. Sınıf docstring'i metodu kapsamaz; her fonksiyonun en az bir satır İngilizce docstring'i olmalı.
CLAUDE.md hard rule: "All functions must have a docstring — minimum one line, always in English."
Öneri: Metoda """Return the placeholder marker intact when the key is absent.""" gibi tek satırlık bir İngilizce docstring ekle.
3. Tanımlayıcıyı tekrarlayan gereksiz yorum: ALL = "all" # every user
ALL enum değeri zaten "herkesi" ifade ediyor; # every user yorumu ismi paraphrase etmekten öteye geçmiyor, ek bir sınır/istisna bilgisi vermiyor. Repo stili açıkça anlaşılanı tekrar eden yorumları önermiyor.
Öneri: Yorumu kaldır. Gerçekten ayırt edici bir bilgi varsa (örn. pasif hesapları da kapsadığı) onu yaz: # includes inactive accounts.
Route → repository doğrudan çağrı (blocker): app/services/announcement.py içine get_active_banner_service eklendi; route artık servis üzerinden geçiyor — api → services → repositories akışı korunuyor.
_SafeDict.__missing__ docstring eksik: tek satır İngilizce docstring eklendi.
Gereksiz yorum (ALL = "all" # every user): kaldırıldı.
REVIEW.md kurallarına aykırı veya tespit edilebilir bir bug kalmadı.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.