diff --git a/warehouse/email/ses/models.py b/warehouse/email/ses/models.py index 683dbbc5b895..043dc19babd2 100644 --- a/warehouse/email/ses/models.py +++ b/warehouse/email/ses/models.py @@ -251,7 +251,7 @@ class EmailMessage(db.Model): backref="email", cascade="all, delete-orphan", lazy=False, - order_by=lambda: Event.created, + order_by=lambda: Event.created, # type: ignore ) diff --git a/warehouse/packaging/models.py b/warehouse/packaging/models.py index f9c105ccea91..54eba2b4f498 100644 --- a/warehouse/packaging/models.py +++ b/warehouse/packaging/models.py @@ -179,7 +179,7 @@ class Project(SitemapMixin, TwoFactorRequireable, db.Model): "Release", backref="project", cascade="all, delete-orphan", - order_by=lambda: Release._pypi_ordering.desc(), + order_by=lambda: Release._pypi_ordering.desc(), # type: ignore passive_deletes=True, ) @@ -416,7 +416,7 @@ def __table_args__(cls): # noqa _classifiers = orm.relationship( Classifier, backref="project_releases", - secondary=lambda: release_classifiers, + secondary=lambda: release_classifiers, # type: ignore order_by=expression.case( {c: i for i, c in enumerate(sorted_classifiers)}, value=Classifier.classifier, @@ -430,7 +430,7 @@ def __table_args__(cls): # noqa backref="release", cascade="all, delete-orphan", lazy="dynamic", - order_by=lambda: File.filename, + order_by=lambda: File.filename, # type: ignore passive_deletes=True, )