Skip to content

Commit

Permalink
lint: ignore lambdas
Browse files Browse the repository at this point in the history
See python/mypy#4226

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
miketheman committed Mar 7, 2022
1 parent 2a5e20b commit 6bbfc01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion warehouse/email/ses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand Down
6 changes: 3 additions & 3 deletions warehouse/packaging/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down Expand Up @@ -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,
Expand All @@ -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,
)

Expand Down

0 comments on commit 6bbfc01

Please sign in to comment.