File tree Expand file tree Collapse file tree
api/projects/code_references Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22from django .db import models
33from django .db .models .expressions import Func
44
5+ from projects .code_references .types import JSONCodeReference
6+
57
68class FeatureFlagCodeReferencesScan (models .Model ):
79 """
@@ -16,7 +18,7 @@ class FeatureFlagCodeReferencesScan(models.Model):
1618
1719 repository_url = models .URLField () # Provider-agnostic
1820 revision = models .CharField (max_length = 100 )
19- code_references = models .JSONField (default = list )
21+ code_references = models .JSONField [ list [ JSONCodeReference ]] (default = list )
2022
2123 created_at = models .DateTimeField (auto_now_add = True , db_index = True )
2224
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22from datetime import datetime
3+ from typing import TypedDict
4+
5+
6+ class JSONCodeReference (TypedDict ):
7+ feature_name : str
8+ file_path : str
9+ line_number : int
310
411
512@dataclass
You can’t perform that action at this time.
0 commit comments