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

Be more precise than generic Callable in type hints #199

Open
benoit74 opened this issue Oct 3, 2024 · 2 comments
Open

Be more precise than generic Callable in type hints #199

benoit74 opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@benoit74
Copy link
Collaborator

benoit74 commented Oct 3, 2024

callback argument of zim.creater.Creator.add_item_for is reported by pyright as partially unknown when in strict mode due to the use of generic Callable.

This is a problem in projects setting pyright in strict mode.

The same generic Callable seems to be an issue in other parts of the code.

We should probably fix this with a more precise type hint,

@rgaudin
Copy link
Member

rgaudin commented Oct 3, 2024

Indeed, we should define a signature/interface for it. It's not like it's used in many ways anyway

@benoit74 benoit74 added this to the 5.0.0 milestone Nov 14, 2024
@benoit74 benoit74 self-assigned this Nov 14, 2024
@benoit74 benoit74 modified the milestones: 5.0.0, backlog Dec 19, 2024
@benoit74
Copy link
Collaborator Author

Callable typing issue are fixed with #221, #227 and soon #220 . We might want to define a signature/interface, but this is beyond 5.0.0 for me, so postponing to later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants