Skip to content

Conversation

@JP-Ellis
Copy link
Contributor

📝 Summary

Define types for the various supported UUID formats.

🚨 Breaking Changes

🔥 Motivation

🔨 Test Plan

🔗 Related issues/PRs

Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis JP-Ellis self-assigned this Sep 26, 2025
Copilot AI review requested due to automatic review settings September 26, 2025 06:13
@JP-Ellis JP-Ellis enabled auto-merge (rebase) September 26, 2025 06:13
Copy link
Contributor

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 defines a reusable type for UUID format names to improve code maintainability and consistency across modules. The change replaces inline Literal type annotations with a centralized _UUID_FORMAT_NAMES type definition.

  • Extracts UUID format names into a reusable _UUID_FORMAT_NAMES type
  • Updates type annotations to use the new centralized type
  • Adds explicit type annotations to _UUID_FORMATS dictionaries

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/pact/match/init.py Defines _UUID_FORMAT_NAMES type and updates function parameter annotation
src/pact/generate/init.py Defines _UUID_FORMAT_NAMES type and updates function parameter annotation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.



_UUID_FORMATS = {
_UUID_FORMAT_NAMES = Literal["simple", "lowercase", "uppercase", "urn"]
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

The _UUID_FORMAT_NAMES type is duplicated across both files. Consider defining it in a shared module to maintain a single source of truth and prevent inconsistencies.

Suggested change
_UUID_FORMAT_NAMES = Literal["simple", "lowercase", "uppercase", "urn"]
from pact.types import _UUID_FORMAT_NAMES

Copilot uses AI. Check for mistakes.


_UUID_FORMATS = {
_UUID_FORMAT_NAMES = Literal["simple", "lowercase", "uppercase", "urn"]
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

The _UUID_FORMAT_NAMES type is duplicated across both files. Consider defining it in a shared module to maintain a single source of truth and prevent inconsistencies.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52%. Comparing base (65cf3bc) to head (372a620).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1251   +/-   ##
====================================
  Coverage    52%     52%           
====================================
  Files        32      32           
  Lines      3725    3727    +2     
====================================
+ Hits       1963    1965    +2     
  Misses     1762    1762           
Flag Coverage Δ
tests 52% <100%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JP-Ellis JP-Ellis merged commit b9a135e into main Sep 26, 2025
62 checks passed
@JP-Ellis JP-Ellis deleted the chore/update-uuid-format-names branch September 26, 2025 06:22
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