Skip to content

allow uuid.UUID in TypeID.from_uuid#21

Merged
akhundMurad merged 1 commit intoakhundMurad:mainfrom
rbuffat:generalize_typeid_from_uuid_type
Nov 20, 2025
Merged

allow uuid.UUID in TypeID.from_uuid#21
akhundMurad merged 1 commit intoakhundMurad:mainfrom
rbuffat:generalize_typeid_from_uuid_type

Conversation

@rbuffat
Copy link
Copy Markdown

@rbuffat rbuffat commented Mar 27, 2025

With the recent release 0.3.2 we ran into mypy errors when passing a uuid.UUID to TypeID.from_uuid:

error: Argument "suffix" to "from_uuid" has incompatible type "uuid.UUID"; expected "uuid6.UUID"  [arg-type]

uuid6.UUID subclasses uuid.UUID. This PR allows to pass uuid.UUID to TypeID.from_uuid.

@iloveitaly
Copy link
Copy Markdown
Contributor

Looks like a good change to me

Copy link
Copy Markdown
Owner

@akhundMurad akhundMurad left a comment

Choose a reason for hiding this comment

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

LGTM

@akhundMurad akhundMurad merged commit 7da44b8 into akhundMurad:main Nov 20, 2025
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.

3 participants