Skip to content

Commit

Permalink
create detection models #226
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-flo committed Jan 27, 2025
1 parent 6983b99 commit a91ac59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
from typing import List

class PullRequest:
from pydantic import BaseModel


class PullRequest(BaseModel):
id: str
title: str
description: str

class Rule:
class Rule(BaseModel):
name: str
description: str
bad_practice_id: str

class PullRequestWithBadPractices:
class PullRequestWithBadPractices(BaseModel):
pull_request_id: str
bad_practice_ids: List[str]

Expand Down
3 changes: 1 addition & 2 deletions server/intelligence-service/app/routers/detector.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import List
from fastapi import APIRouter
from pydantic import BaseModel

from app.detector.bad_practice_detector import PullRequestWithBadPractices, PullRequest, Rule, detectbadpractices
from ..detector.bad_practice_detector import PullRequestWithBadPractices, PullRequest, Rule, detectbadpractices

router = APIRouter(prefix="/detector", tags=["detector"])

Expand Down

0 comments on commit a91ac59

Please sign in to comment.