Skip to content

Commit

Permalink
TMP
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Mar 24, 2023
1 parent a4789ac commit 117e64a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cognite/client/data_classes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ def __eq__(self, other: Any) -> bool:

def dump(self, camel_case: bool = False) -> Dict[str, Any]:
"""Dump the instance into a json serializable Python data type.
Args:
camel_case (bool): Use camelCase for attribute names. Defaults to False.
Returns:
Dict[str, Any]: A dictionary representation of the instance.
"""
Expand All @@ -65,7 +67,7 @@ def dump(self, camel_case: bool = False) -> Dict[str, Any]:

class CogniteResponse(CogniteBase):
@classmethod
def _load(cls, api_response: Dict[str, Any]) -> T_CogniteBase:
def _load(cls, api_response: Dict[str, Any]) -> T_CogniteResponse:
raise NotImplementedError

def to_pandas(self) -> pandas.DataFrame:
Expand All @@ -84,7 +86,7 @@ def _cognite_client(self) -> CogniteClient:
raise CogniteMissingClientError

@_cognite_client.setter
def _cognite_client(self, value: Optional[CogniteClient]):
def _cognite_client(self, value: Optional[CogniteClient]) -> None:
from cognite.client import CogniteClient

if value is None or isinstance(value, CogniteClient):
Expand Down Expand Up @@ -163,7 +165,7 @@ def _property_setter(self: Any, schema_name: str, value: Any) -> None:


class CogniteResourceList(CogniteBase, UserList):
_RESOURCE: Type[CogniteResource]
_RESOURCE: Type[T_CogniteResource]

@property
def _cognite_client(self) -> CogniteClient:
Expand All @@ -173,7 +175,7 @@ def _cognite_client(self) -> CogniteClient:
raise CogniteMissingClientError

@_cognite_client.setter
def _cognite_client(self, value: Optional[CogniteClient]):
def _cognite_client(self, value: Optional[CogniteClient]) -> None:
from cognite.client import CogniteClient

if value is None or isinstance(value, CogniteClient):
Expand Down Expand Up @@ -270,7 +272,7 @@ def _load(


class CogniteUpdate:
def __init__(self, id: int = None, external_id: str = None):
def __init__(self, id: int = None, external_id: str = None) -> None:
self._id = id
self._external_id = external_id
self._update_object: Dict[str, Any] = {}
Expand Down

0 comments on commit 117e64a

Please sign in to comment.