openzim / openzim/python-scraperlib

Be more precise than generic `Callable` in type hints

Open
#199 2 comments 0 reactions 1 assignee View on GitHub

@benoit74 is already working on this.

Since Nov 14, 2024.

enhancement
Dominant language
Python
Stars
31
Forks
27
Avg merge
3d 7h
Merged PRs (30d)
2

Description

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,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.