You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: clear the stale type: ignore comments and gate warn_unused_ignores
33 line-level ignores across 10 modules no longer suppress anything, per
mypy --warn-unused-ignores in both the CausalPy and CausalPy-pymc6 envs
(identical unused set in both). Deleted them; narrowed the one partially
unused case in instrumental_variable.py to the code still needed
(call-arg, not union-attr).
warn_unused_ignores is now on in [tool.mypy] so a future fix that drops
the underlying error also has to drop its now-stale ignore.
Copy file name to clipboardExpand all lines: pyproject.toml
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -235,7 +235,8 @@ ignore_missing_imports = true
235
235
warn_unused_configs = true
236
236
# The allowlist is empty: the package type-checks clean. What could not be expressed in the type system is a handful of line-level ``type: ignore`` comments, each with the reasoning next to it.
237
237
#
238
-
# ``warn_unused_ignores`` would make those comments self-cleaning, and is worth turning on, but it currently reports 33 pre-existing unused ignores across 10 modules. Clearing those is its own change, not a rider on this one.
238
+
# ``warn_unused_ignores`` keeps those comments self-cleaning: a fix that removes the underlying error now fails the check unless the now-unneeded ignore is deleted with it.
0 commit comments