Skip to content

Conversation

@ternaus
Copy link
Owner

@ternaus ternaus commented Jan 14, 2026

Summary by Sourcery

Bump package and tooling to Python 3.10+, declare typing support, and refresh development tooling configuration.

Build:

  • Increase package version to 0.0.9 and raise the minimum supported Python version to 3.10, updating associated classifiers and removing legacy typing-extensions dependency.
  • Include the py.typed marker file in the distributed package to advertise inline type hints.

CI:

  • Update pre-commit hook versions for core hooks, pyproject-fmt, Ruff, and mypy.

Documentation:

  • Add a CLAUDE.md file documenting project-specific guidelines for AI-assisted development.

Chores:

  • Remove obsolete Cursor editor rules configuration.

@ternaus ternaus requested a review from Copilot January 14, 2026 09:07
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 14, 2026

Reviewer's Guide

This PR declares the package as typed by adding py.typed to package data, bumps the project version and Python baseline to 3.10, updates supported Python classifiers and tooling configs accordingly, refreshes pre-commit hook versions, and replaces an editor-specific rules file with a general CLAUDE project guidelines document.

Flow diagram for packaging with py.typed and Python 3.10 baseline

flowchart TD
    A[Start development] --> B[Write code in google_docstring_parser]
    B --> C[Add type hints using Python 3.10 features]
    C --> D[Configure pyproject.toml\npython >= 3.10\nclassifiers updated]
    D --> E[Include py.typed in\npackage data]

    E --> F[Build distribution]
    F --> G[Upload to package index]

    subgraph Consumer_Project[Downstream project]
        H[Install google-docstring-parser 0.0.9]
        I[Type checker reads py.typed]
        J[Full type checking enabled\nfor library usage]
    end

    G --> H
    H --> I --> J
Loading

File-Level Changes

Change Details Files
Declare the library as PEP 561 typed and align packaging metadata with the change.
  • Increment the project version from 0.0.8 to 0.0.9 for a new release.
  • Add py.typed to the google_docstring_parser package data so type checkers recognize the package as typed.
  • Raise the requires-python constraint from >=3.9 to >=3.10 to match typing expectations.
  • Update Trove classifiers to drop 3.9, keep 3.10–3.13, and add 3.14, aligning supported versions with the new baseline.
  • Remove the typing-extensions dependency that was only needed for Python <3.10.
pyproject.toml
Align linting and type-checking tooling configuration with Python 3.10.
  • Update Ruff target-version from py39 to py310 and adjust the comment to assume Python 3.10.
  • Update mypy configuration to python_version = "3.10" so type checking matches the new baseline.
pyproject.toml
Refresh pre-commit hook versions for tooling.
  • Bump pre-commit-hooks from v5.0.0 to v6.0.0.
  • Bump pyproject-fmt from v2.6.0 to v2.11.1.
  • Bump ruff-pre-commit (Ruff) from v0.11.10 to v0.14.11.
  • Bump mypy pre-commit mirror from v1.15.0 to v1.19.1.
.pre-commit-config.yaml
Replace editor-specific automation rules with general AI usage guidelines.
  • Add CLAUDE.md documenting communication rules, development philosophy, Python/testing conventions, and tooling usage for Claude AI.
  • Remove the .cursor/rules/custom-rule.mdc file, centralizing such guidance in CLAUDE.md.
CLAUDE.md
.cursor/rules/custom-rule.mdc

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

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 adds PEP 561 compliance by including a py.typed marker file, enabling type checkers to use the package's type hints. The PR also modernizes the project by dropping Python 3.9 support and updating tooling versions.

Changes:

  • Added py.typed marker file and updated package metadata for PEP 561 compliance
  • Dropped Python 3.9 support, bumped minimum version to 3.10, and removed typing-extensions dependency
  • Updated pre-commit hook versions (pre-commit-hooks, pyproject-fmt, ruff, mypy)
  • Consolidated project guidelines into CLAUDE.md and removed .cursor/rules/custom-rule.mdc

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
google_docstring_parser/py.typed Empty marker file for PEP 561 type hint distribution
pyproject.toml Version bump to 0.0.9, Python 3.10+ requirement, py.typed in package-data, removed typing-extensions, added Python 3.14 classifier
CLAUDE.md New documentation for AI assistant guidelines and project conventions
.pre-commit-config.yaml Updated tool versions (v6.0.0, v2.11.1, v0.14.11, v1.19.1)
.cursor/rules/custom-rule.mdc Removed in favor of CLAUDE.md

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ternaus ternaus merged commit 50de4fb into main Jan 14, 2026
5 of 17 checks passed
@ternaus ternaus deleted the add_py_typed branch January 14, 2026 09:16
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.

2 participants