@@ -81,24 +81,24 @@ class MyModel(BaseMixin[int], Model): # Integer serial primary key; alt: UUID
8181from .roles import ActorType , RoleMixin , with_roles
8282
8383__all__ = [
84- 'PkeyType' ,
85- 'IdentityOptions' ,
86- 'IdMixin' ,
87- 'TimestampMixin' ,
88- 'PermissionMixin' ,
89- 'UrlDict' ,
90- 'UrlForMixin' ,
91- 'NoIdMixin' ,
84+ 'BaseIdNameMixin' ,
9285 'BaseMixin' ,
9386 'BaseNameMixin' ,
94- 'BaseScopedNameMixin' ,
95- 'BaseIdNameMixin' ,
9687 'BaseScopedIdMixin' ,
9788 'BaseScopedIdNameMixin' ,
89+ 'BaseScopedNameMixin' ,
9890 'CoordinatesMixin' ,
99- 'UuidMixin' ,
100- 'RoleMixin' ,
91+ 'IdMixin' ,
92+ 'IdentityOptions' ,
93+ 'NoIdMixin' ,
94+ 'PermissionMixin' ,
95+ 'PkeyType' ,
10196 'RegistryMixin' ,
97+ 'RoleMixin' ,
98+ 'TimestampMixin' ,
99+ 'UrlDict' ,
100+ 'UrlForMixin' ,
101+ 'UuidMixin' ,
102102]
103103
104104PkeyType = TypeVar ('PkeyType' , int , UUID , default = int )
@@ -703,7 +703,9 @@ class BaseNameMixin(BaseMixin[PkeyType, ActorType]):
703703 # Drop CHECK constraint first in case it was already present
704704 op.drop_constraint(tablename + '_name_check', tablename)
705705 # Create CHECK constraint
706- op.create_check_constraint(tablename + '_name_check', tablename, "name <> ''")
706+ op.create_check_constraint(
707+ tablename + '_name_check', tablename, "name <> ''"
708+ )
707709 """
708710
709711 #: Prevent use of these reserved names
@@ -834,7 +836,9 @@ class BaseScopedNameMixin(BaseMixin[PkeyType, ActorType]):
834836
835837 class Event(BaseScopedNameMixin, Model):
836838 __tablename__ = 'event'
837- organizer_id: Mapped[int] = sa_orm.mapped_column(sa.ForeignKey('organizer.id'))
839+ organizer_id: Mapped[int] = sa_orm.mapped_column(
840+ sa.ForeignKey('organizer.id')
841+ )
838842 organizer: Mapped[Organizer] = relationship(Organizer)
839843 parent = sa_orm.synonym('organizer')
840844 __table_args__ = (sa.UniqueConstraint('organizer_id', 'name'),)
@@ -851,7 +855,9 @@ class Event(BaseScopedNameMixin, Model):
851855 # Drop CHECK constraint first in case it was already present
852856 op.drop_constraint(tablename + '_name_check', tablename)
853857 # Create CHECK constraint
854- op.create_check_constraint(tablename + '_name_check', tablename, "name <> ''")
858+ op.create_check_constraint(
859+ tablename + '_name_check', tablename, "name <> ''"
860+ )
855861 """
856862
857863 #: Prevent use of these reserved names
@@ -1022,7 +1028,9 @@ class BaseIdNameMixin(BaseMixin[PkeyType, ActorType]):
10221028 # Drop CHECK constraint first in case it was already present
10231029 op.drop_constraint(tablename + '_name_check', tablename)
10241030 # Create CHECK constraint
1025- op.create_check_constraint(tablename + '_name_check', tablename, "name <> ''")
1031+ op.create_check_constraint(
1032+ tablename + '_name_check', tablename, "name <> ''"
1033+ )
10261034 """
10271035
10281036 #: Allow blank names after all?
@@ -1208,7 +1216,9 @@ class BaseScopedIdNameMixin(BaseScopedIdMixin[PkeyType, ActorType]):
12081216
12091217 class Event(BaseScopedIdNameMixin, Model):
12101218 __tablename__ = 'event'
1211- organizer_id: Mapped[int] = sa_orm.mapped_column(sa.ForeignKey('organizer.id'))
1219+ organizer_id: Mapped[int] = sa_orm.mapped_column(
1220+ sa.ForeignKey('organizer.id')
1221+ )
12121222 organizer: Mapped[Organizer] = relationship(Organizer)
12131223 parent = sa_orm.synonym('organizer')
12141224 __table_args__ = (sa.UniqueConstraint('organizer_id', 'url_id'),)
@@ -1225,7 +1235,9 @@ class Event(BaseScopedIdNameMixin, Model):
12251235 # Drop CHECK constraint first in case it was already present
12261236 op.drop_constraint(tablename + '_name_check', tablename)
12271237 # Create CHECK constraint
1228- op.create_check_constraint(tablename + '_name_check', tablename, "name <> ''")
1238+ op.create_check_constraint(
1239+ tablename + '_name_check', tablename, "name <> ''"
1240+ )
12291241 """
12301242
12311243 #: Allow blank names after all?
0 commit comments