Remove absolute plugin imports, some fixes

This commit is contained in:
ChrisTerBeke 2019-07-29 16:11:01 +02:00
parent 7d69b1727d
commit ddd282eef3
16 changed files with 67 additions and 62 deletions

View file

@ -3,6 +3,10 @@ from datetime import datetime, timezone
from typing import TypeVar, Dict, List, Any, Type, Union
# Type variable used in the parse methods below, which should be a subclass of BaseModel.
T = TypeVar("T", bound="BaseModel")
class BaseModel:
def __init__(self, **kwargs) -> None:
@ -29,9 +33,6 @@ class BaseModel:
def toDict(self) -> Dict[str, Any]:
return self.__dict__
# Type variable used in the parse methods below, which should be a subclass of BaseModel.
T = TypeVar("T", bound="BaseModel")
## Parses a single model.
# \param model_class: The model class.
# \param values: The value of the model, which is usually a dictionary, but may also be already parsed.