Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Aug 14, 2024
1 parent 9a700d6 commit e6acac7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fedcode/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
# See https://aboutcode.org for more information about nexB OSS projects.
#

from ninja import ModelSchema
from typing import List

from ninja import ModelSchema

from fedcode import models


Expand All @@ -23,6 +24,7 @@ class Repository(ModelSchema):
"""
A git repository used as a backing storage for Package and vulnerability data
"""

class Meta:
model = models.Repository
exclude = ["admin"]
Expand All @@ -35,11 +37,13 @@ class Meta:
model = models.Vulnerability
fields = "__all__"


class Reputation(ModelSchema):
"""
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like
https://www.w3.org/ns/activitystreams#Dislike
"""

class Meta:
model = models.Reputation
fields = ["object_id", "voter", "positive"]
Expand All @@ -53,6 +57,7 @@ class Note(ModelSchema):
If the author is a Person actor then the content is always plain text
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note
"""

reputation: List[Reputation]
reply_to: "Note"

Expand All @@ -68,6 +73,7 @@ class Package(ModelSchema):
"""
A software package identified by its package url ( PURL ) ignoring versions
"""

remote_actor: RemoteActor
notes: List[Note]

Expand Down

0 comments on commit e6acac7

Please sign in to comment.