Skip to content

python 3.15 compat, linting fixes - #73

Merged
bckohan merged 4 commits into
mainfrom
py315
Sep 2, 2026
Merged

bckohan merged 4 commits into
mainfrom
py315

Conversation

@bckohan

@bckohan bckohan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings August 3, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.2 and 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-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.38462% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.98%. Comparing base (59514ad) to head (2f16556).

Files with missing lines Patch % Lines
src/sphinxcontrib/typer/__init__.py 90.38% 5 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bckohan
bckohan merged commit 002fe92 into main Sep 2, 2026
19 checks passed
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.

3 participants