Chore: Refactored import of BaseModel from pydantic

This commit is contained in:
Amritanshu Agrawal 2023-08-15 06:38:19 +05:30
parent d3741a63ed
commit b62bf1bcca
22 changed files with 22 additions and 24 deletions

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -3,12 +3,12 @@ import uuid
from datetime import datetime from datetime import datetime
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel
from .cost_centre import CostCentreLink from .cost_centre import CostCentreLink

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel
from .account import AccountLink from .account import AccountLink

View File

@ -1,4 +1,4 @@
from pydantic.main import BaseModel from pydantic import BaseModel
class Message(BaseModel): class Message(BaseModel):

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -1,8 +1,7 @@
import uuid import uuid
from brewman.schemas import to_camel from brewman.schemas import to_camel
from pydantic import ConfigDict from pydantic import BaseModel, ConfigDict
from pydantic.main import BaseModel
class PermissionItem(BaseModel): class PermissionItem(BaseModel):

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel
from .product import ProductLink from .product import ProductLink

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -3,12 +3,12 @@ import uuid
from datetime import date, datetime from datetime import date, datetime
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel
from .account import AccountLink from .account import AccountLink

View File

@ -1,8 +1,7 @@
import uuid import uuid
from brewman.schemas import to_camel from brewman.schemas import to_camel
from pydantic import ConfigDict, Field from pydantic import BaseModel, ConfigDict, Field
from pydantic.main import BaseModel
from .permission import PermissionItem from .permission import PermissionItem

View File

@ -4,12 +4,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -2,12 +2,12 @@ from datetime import date, datetime
from decimal import Decimal from decimal import Decimal
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel

View File

@ -3,13 +3,13 @@ import uuid
from datetime import datetime from datetime import datetime
from pydantic import ( from pydantic import (
BaseModel,
ConfigDict, ConfigDict,
Field, Field,
FieldSerializationInfo, FieldSerializationInfo,
field_serializer, field_serializer,
field_validator, field_validator,
) )
from pydantic.main import BaseModel
from . import to_camel from . import to_camel
from .role import RoleItem from .role import RoleItem