Skip to content

`"Page" has no attribute "find_tables" in PyMuPDF 1.27 #4932

@jamesbraza

Description

@jamesbraza

Description of the bug

Upgrading from PyMuPDF 1.26.7 to 1.27.2 (since #4862 and #4869 added a py.typed), the find_tables monkeypatch is not working with mypy: https://github.com/pymupdf/PyMuPDF/blob/1.27.2/src/__init__.py#L25574-L25575

How to reproduce the bug

Upgrading from PyMuPDF 1.26.7 to 1.27.2, with the below script using Python 3.13:

import pymupdf

page: pymupdf.Page
page.find_tables()

I now see this attr-defined error with mypy==1.19.1:

a.py:4:1: error: "Page" has no
  attribute "find_tables"  [attr-defined]
      page.find_tables()
      ^~~~~~~~~~~~~~~~

PyMuPDF version

1.27.2

Operating system

MacOS

Python version

3.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix developedrelease schedule to be determined

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions