Coverage for harbor_cli/models.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2023-02-09 12:09 +0100

1"""Models used by various modules. 

2 

3Defined here to avoid circular imports when using these models in multiple 

4modules that otherwise can't mutually import each other. 

5Refactor to module (directory with __init__.py) if needed. 

6""" 

7from __future__ import annotations 

8 

9from harborapi.models import Project 

10from harborapi.models.base import BaseModel 

11 

12 

13# TODO: split up CommandSummary into CommandSummary and CommandSearchResult 

14# so that the latter can have the score field 

15class CommandSummary(BaseModel): 

16 name: str 

17 help: str 

18 score: int = 0 # match score 

19 

20 

21class ProjectExtended(Project): 

22 """Signal to the render function that we want to print extended information about a project.""" 

23 

24 pass