Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add newline at end of file #19

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codeinsight_sdk/handlers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .inventory import InventoryHandler
from .project import ProjectHandler
from .report import ReportHandler
from .report import ReportHandler
10 changes: 7 additions & 3 deletions codeinsight_sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from dataclasses_json import DataClassJsonMixin, dataclass_json
from typing import Any, Optional, List, Dict


@dataclass
class Project(DataClassJsonMixin):
id: int
Expand All @@ -26,6 +27,7 @@ class Vulnerability(DataClassJsonMixin):
vulnerabilityCvssV3Score: int
vulnerabilityCvssV3Severity: str


@dataclass
class ProjectInventoryItem(DataClassJsonMixin):
itemNumber: int
Expand All @@ -45,12 +47,14 @@ class ProjectInventoryItem(DataClassJsonMixin):
vulnerabilitySummary: Optional[List[Dict[str, Dict]]] = None
filePaths: Optional[List[str]] = None

@dataclass_json #Trying this style instead of DataClassJsonMixin

@dataclass_json # Trying this style instead of DataClassJsonMixin
@dataclass
class ProjectInventory():
class ProjectInventory:
projectId: int
inventoryItems: List[ProjectInventoryItem]


@dataclass
class Report(DataClassJsonMixin):
id: int
Expand All @@ -61,4 +65,4 @@ class Report(DataClassJsonMixin):
enableProjectPicker: bool
order: int
createdDateTime: str
updatedDateTime: str
updatedDateTime: str
2 changes: 1 addition & 1 deletion examples/example-9-dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@


inventory = client.project_inventory.get(1)
df = pd.DataFrame(inventory.__dict__['inventoryItems'])
df = pd.DataFrame(inventory.__dict__["inventoryItems"])
5 changes: 2 additions & 3 deletions examples/shared.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

BASE_URL = 'https://api.revenera.com'
AUTH_TOKEN = 'test'
BASE_URL = "https://api.revenera.com"
AUTH_TOKEN = "test"
Loading