Skip to content

Improve invalid source type error#2169

Open
Martonveghcode wants to merge 2 commits into
microsoft:mainfrom
Martonveghcode:main
Open

Improve invalid source type error#2169
Martonveghcode wants to merge 2 commits into
microsoft:mainfrom
Martonveghcode:main

Conversation

@Martonveghcode

Copy link
Copy Markdown

Summary

  • Update the MarkItDown.convert() unsupported-source TypeError to list pathlib.Path, which is already accepted by the API.
  • Add a focused regression test that checks the error message lists the supported source types.

Validation

  • python -m pytest packages/markitdown/tests/test_module_misc.py::test_invalid_source_type_error_lists_supported_types packages/markitdown/tests/test_module_misc.py::test_exceptions
  • python -m black --check packages/markitdown/src/markitdown/_markitdown.py packages/markitdown/tests/test_module_misc.py

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.

1 participant