Skip to content

fix: ignore type errors in copied files without mutants#523

Draft
skyswordw wants to merge 1 commit into
boxed:mainfrom
skyswordw:fix-unowned-type-check-errors
Draft

fix: ignore type errors in copied files without mutants#523
skyswordw wants to merge 1 commit into
boxed:mainfrom
skyswordw:fix-unowned-type-check-errors

Conversation

@skyswordw
Copy link
Copy Markdown

Summary

Fixes a type_check_command crash when a type checker reports an error in a copied file that contains no generated mutmut mutant functions.

The type-check filtering step still raises for unowned errors in files that do contain generated mutants, because those remain ambiguous and may indicate a mutation affected code outside the mutant function body.

Closes #522.

Testing

  • uv run pytest tests/test_type_checking.py
  • uv run pytest tests/test_type_checking.py tests/e2e/test_e2e_type_checking.py
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run pytest -k 'not test_setproctitle_crashes_after_fork_with_corefoundation_loaded' -> 299 passed, 2 skipped, 1 deselected

Notes:

  • uv run pytest reported 299 passed, 2 skipped, 1 failed; the failure was the existing macOS sentinel tests/utils/test_safe_setproctitle.py::test_setproctitle_crashes_after_fork_with_corefoundation_loaded, unrelated to type-check filtering.
  • uv run pre-commit run --all-files was attempted but hung during hook environment bootstrap in git submodule update --init --recursive --depth=1, before running project checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

type_check_command: "Could not find mutant for type error" crash when the pyrefly reports an error outside any mutant's line range

1 participant