Skip to content

Commit fadeba2

Browse files
authored
mypy's warn_unused_ignores is unreliable, so disable it (#1213)
Discussion at python/mypy#2960
1 parent 58edc4a commit fadeba2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

funnel/models/sponsor_membership.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class __Profile:
148148
lazy='dynamic',
149149
primaryjoin=db.and_(
150150
SponsorMembership.profile_id == Profile.id,
151-
SponsorMembership.record_type == MEMBERSHIP_RECORD_TYPE.INVITE,
151+
SponsorMembership.record_type == MEMBERSHIP_RECORD_TYPE.INVITE, # type: ignore[has-type]
152152
SponsorMembership.is_active,
153153
),
154154
order_by=SponsorMembership.granted_at.desc(),

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ files = **/*.py
2626
ignore_missing_imports = true
2727
show_error_codes = true
2828
warn_unreachable = true
29-
warn_unused_ignores = True
29+
# Unsafe with pre-commit, see https://github.com/python/mypy/issues/2960
30+
# warn_unused_ignores = True
3031
plugins = sqlmypy

0 commit comments

Comments
 (0)