PyMuPDF icon indicating copy to clipboard operation
PyMuPDF copied to clipboard

Request: adding type hints

Open jamesbraza opened this issue 10 months ago • 2 comments

Is your feature request related to a problem? Please describe.

Running mypy==1.9.0 with PyMuPDF==1.24.1:

foo.py:12:1: error: Skipping analyzing "fitz": module is installed, but missing library stubs or py.typed marker  [import-untyped]
    import fitz
    ^

Describe the solution you'd like

It would be nice to:

  • Add type hints
  • Add py.typed metadata

Describe alternatives you've considered

N/a

Additional context

Thank you in advance 👍

jamesbraza avatar Apr 08 '24 16:04 jamesbraza

We are looking at possible architectural changes that will allow better type hints in future. But it's quite an involved process so there are no timescales at the moment.

Duplicate of #2883.

JorjMcKie avatar Apr 09 '24 08:04 JorjMcKie