Skip to content

Support Python 3.13 #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

Support Python 3.13 #218

wants to merge 2 commits into from

Conversation

nobu-g
Copy link
Member

@nobu-g nobu-g commented Apr 13, 2025

No description provided.

@nobu-g nobu-g requested a review from Copilot April 27, 2025 10:33
Copy link

@Copilot Copilot AI left a comment

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 aims to enable support for Python 3.13 by updating version constraints, workflow matrices, and adding explicit return type annotations to many functions. Key changes include:

  • Adjusting python version constraints and update linting configurations in pyproject.toml and various GitHub workflow files.
  • Adding return type annotations (mostly "-> None") in many scripts and modules.
  • Minor dependency and configuration updates (e.g. adding “rich” in pre-commit config, bumping max-parallel settings).

Reviewed Changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/kwja/cli/cli.py Added return type annotations for load functions.
scripts/*.py (various) Added explicit return types for main and helper functions.
pyproject.toml Updated Python version constraint and linting rules for Python 3.13.
CHANGELOG.md Documented support for Python 3.13.
.pre-commit-config.yaml & workflows Updated dependency list and workflow matrices for 3.13 support.
Comments suppressed due to low confidence (1)

pyproject.toml:101

  • Consider reviewing the 'target-version' setting to better reflect support for Python 3.13, ensuring consistency with the new version constraints.
target-version = "py39"  # The minimum Python version to target

Comment on lines +127 to 128
assert morpheme.canon is not None
if len(canons) > 1 or sampled_canon2freq.get(morpheme.canon, 0) >= args.max_samples:
Copy link
Preview

Copilot AI Apr 27, 2025

Choose a reason for hiding this comment

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

Ensure that adding the assertion for 'morpheme.canon' is appropriate; if a None value is possible in valid scenarios, consider handling this case gracefully instead of triggering an exception.

Suggested change
assert morpheme.canon is not None
if len(canons) > 1 or sampled_canon2freq.get(morpheme.canon, 0) >= args.max_samples:
if morpheme.canon is None:
excluded_nums["none_canon"] = excluded_nums.get("none_canon", 0) + 1
continue

Copilot uses AI. Check for mistakes.

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