mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
fix(typing): resolve mypy errors in db models
This commit is contained in:
3 files changed
+3
-12
No files matched your search
@@ -21,11 +21,10 @@ from fastapi.encoders import jsonable_encoder
|
||||
from sqlalchemy import Column, DateTime, func, inspect
|
||||
from sqlalchemy.types import TypeDecorator, CHAR, VARCHAR
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.orm import as_declarative
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
|
||||
@as_declarative()
|
||||
class Base:
|
||||
class Base(DeclarativeBase):
|
||||
def asdict(self):
|
||||
|
||||
return {c.key: getattr(self, c.key) for c in inspect(self).mapper.column_attrs}
|
||||
|
||||
Reference in new issue
Block a user