Skip to content
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

typing doesn't match impl #69

Closed
trim21 opened this issue Sep 9, 2024 · 7 comments · Fixed by #70
Closed

typing doesn't match impl #69

trim21 opened this issue Sep 9, 2024 · 7 comments · Fixed by #70

Comments

@trim21
Copy link
Contributor

trim21 commented Sep 9, 2024

import uuid_utils
from uuid_utils import uuid7


print(uuid_utils.__version__) # 0.9.0

u = uuid7()

print(u, u.is_safe)

@property
def is_safe(self) -> SafeUUID: ...

    print(u, u.is_safe)
             ^^^^^^^^^
AttributeError: 'uuid_utils.UUID' object has no attribute 'is_safe'
@trim21
Copy link
Contributor Author

trim21 commented Sep 9, 2024

also kwargs is_safe doesn't exist

is_safe: SafeUUID = ...,

@trim21
Copy link
Contributor Author

trim21 commented Sep 9, 2024

also SafeUUID doesn't exists in uuid_utils/__init__.py, but exists in uuid_utils/__init__.pyi

@aminalaee
Copy link
Owner

Yes the whole safe UUID idea doesn't exist. Feel free to implement it.

@trim21
Copy link
Contributor Author

trim21 commented Sep 9, 2024

I know nothing about uuid-rs, is generator safe to be called in a multiprocessing?

I think we should remove these typings, and add them back when someone implement it.

@aminalaee
Copy link
Owner

Adding them can't be hard. I will get to it for the next version.

@trim21
Copy link
Contributor Author

trim21 commented Sep 15, 2024

looks like it's difficult to import some python variable and use it in pyo3...

@trim21
Copy link
Contributor Author

trim21 commented Sep 15, 2024

#70

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 a pull request may close this issue.

2 participants