Skip to content

Add type annotations to GrimoireLab Toolkit - #84

Merged
sduenas merged 1 commit into
chaoss:mainfrom
Caligula-95:add-toolkit-typing
Dec 3, 2026
Merged

sduenas merged 1 commit into
chaoss:mainfrom
Caligula-95:add-toolkit-typing

Conversation

@Caligula-95

@Caligula-95 Caligula-95 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds and improves type annotations across GrimoireLab Toolkit.

Related issue: chaoss/grimoirelab#892

Changes

  • Complete type annotations in credential managers.
  • Improve typing in datetime, identity, URI, and introspection utilities.
  • Use straightforward parameter and return types.
  • Return a shallow copy of candidate parameters for variadic signatures, as suggested during the review.
  • Update the relevant docstrings.
  • Include a changelog entry.

No new dependencies have been introduced, and the existing tests remain unchanged.

Validation

  • All 70 existing tests passed on Python 3.11.
  • ruff check . passed.
  • ruff format --check . passed.
  • git diff --check passed.
  • Changelog YAML validated.
  • Additional shallow-copy behavior checks passed.

AI assistance

OpenAI Codex assisted with implementation, and ChatGPT assisted with technical review. Both are disclosed in the Assisted-by commit trailers using the project's requested convention.

The commit also includes the DCO sign-off.

@sduenas sduenas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. Please address inline comments and modify Assisted-by trailer in the commit message as you did for the other PR in chronicler.

Comment thread grimoirelab_toolkit/identities.py Resolved
Comment thread grimoirelab_toolkit/introspect.py Resolved
Comment thread grimoirelab_toolkit/introspect.py Resolved
Comment thread grimoirelab_toolkit/introspect.py Resolved
Comment thread grimoirelab_toolkit/introspect.py Resolved
Comment thread grimoirelab_toolkit/uris.py Resolved
Complete and improve type annotations across credential managers, datetime, identity, URI, and introspection utilities.

Use straightforward parameter and return types, avoid unnecessary local variable annotations, and return a shallow copy of candidate parameters for variadic signatures.

Update the relevant docstrings and include a changelog entry. All 70 existing tests pass, along with Ruff linting and formatting checks.

Refs: chaoss/grimoirelab#892
Signed-off-by: Caligula-95 <93405075+Caligula-95@users.noreply.github.com>
Assisted-by: Codex:gpt-6.2
Assisted-by: ChatGPT:gpt-6.2
@Caligula-95

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

I've addressed all nine inline comments and updated the Assisted-by trailers to follow the same convention as in Chronicler.

I've also verified that the shallow copy behaves as expected. All 70 tests and Ruff checks still pass locally.

Thanks again!

@Caligula-95
Caligula-95 requested a review from sduenas December 2, 2026 17:09

@sduenas sduenas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@sduenas
sduenas merged commit 73c3cea into chaoss:main Dec 3, 2026
1 check 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.

2 participants