Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Summary
This PR introduces the following changes:
1. Dependencies and Configuration
.github/workflows/test.yml:pip installcommands to usepip install ".[dev]"for installing development dependencies.pytestexecution with-p no:warnings.poetry.lock:black,isort,mypy,pypdf,packaging,platformdirs, etc.) to be part of the[tool.poetry.group.dev.dependencies]group.pyproject.toml:[tool.poetry.dependencies]and[tool.poetry.group.dev.dependencies]for better separation of main and dev dependencies.isortconfiguration for consistent import sorting.2. Code Changes
error_handling.py:print_errorfunction for safer error printing with fallback support.__init__.py:print_errorin module exports.cli.py:readiumcommand.outputoption description for clarity.print_errorfor consistent error handling.core.py:overloadand more specific type annotations.3. Tests
test_cli.py:outputoption.test_error_handling.py:print_errorfunction under various scenarios (normal text, rich markup, fallback).test_basic.py:Notes
This update improves dependency management, adds new functionality for safer error handling, and enhances developer and user experiences through additional documentation and robust testing.