Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the project for Python 3.15 compatibility and aligns the codebase and CI configuration with newer linting/type-checking expectations (e.g., modern type syntax and avoiding mutable default arguments).
Changes:
- Bumps package version to
0.9.2and updates the changelog accordingly. - Modernizes typing annotations in
sphinxcontrib.typer(PEP 604 unions, built-in generics) and applies lint-driven refactors. - Expands CI matrices to include Python
3.15(with prereleases enabled) and updates lint/test workflows.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/sphinxcontrib/typer/__init__.py |
Typing modernizations and linting-driven refactors; includes some functional changes in rendering/import helpers. |
README.md |
Minor formatting/lint fixes to examples. |
pyproject.toml |
Version bump and Python 3.15 classifier. |
justfile |
Updates just configuration for uv run invocation. |
doc/source/changelog.rst |
Adds v0.9.2 entry. |
.github/workflows/test.yml |
Adds Python 3.15 to the test matrix (prereleases enabled). |
.github/workflows/lint.yml |
Adjusts lint matrix to include Python 3.15 (prereleases enabled). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
324
to
330
| err_msg = f'Failed to import "{obj_path}"' | ||
| if isinstance(exc, SystemExit): | ||
| err_msg += "The module appeared to call sys.exit()." | ||
| else: | ||
| err_msg += "The following exception was raised:\n{}".format( | ||
| traceback.format_exc() | ||
| err_msg += ( | ||
| f"The following exception was raised:\n{traceback.format_exc()}" | ||
| ) |
Comment on lines
+908
to
+913
| if directive.target is RenderTarget.TEXT: | ||
| tag = "pre" | ||
| rendered = f"<html><body><pre>{rendered}</pre></body></html>" | ||
| elif directive.target is RenderTarget.SVG: | ||
| tag = "svg" | ||
| rendered = f"<html><body>{rendered}</body></html>" |
Comment on lines
+1002
to
+1004
| def typer_ref_role(name, rawtext, text, lineno, inliner, options=None, content=None): | ||
| options = options or {} | ||
| content = content or [] |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
+ Coverage 85.91% 85.98% +0.06%
==========================================
Files 1 1
Lines 426 428 +2
==========================================
+ Hits 366 368 +2
Misses 60 60 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.