Skip to content

Commit a1273bf

Browse files
committed
Fix mypy errors on setdefault TypedDict key
Move the type: ignore onto the non-literal key argument so mypy suppresses the misc error there rather than flagging an unused ignore. https://claude.ai/code/session_01Fc3MJNwp5dLDCxTYjkFrVT
1 parent d0db77e commit a1273bf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • hypothesis/src/hypothesis/internal/conjecture

hypothesis/src/hypothesis/internal/conjecture/engine.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ def _log_phase_statistics(
401401
elapsed = time.perf_counter() - start_time
402402
# A phase can be entered more than once (the explain phase runs once
403403
# per shrinking target), so accumulate into any existing bucket.
404-
stats = self.statistics.setdefault( # type: ignore
405-
phase + "-phase", {"duration-seconds": 0.0, "test-cases": []}
404+
stats = self.statistics.setdefault(
405+
phase + "-phase", # type: ignore
406+
{"duration-seconds": 0.0, "test-cases": []},
406407
)
407408
stats["duration-seconds"] += elapsed - self._nested_phase_seconds
408409
stats["test-cases"] += self.stats_per_test_case

0 commit comments

Comments
 (0)