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

Initialized Table.df as empty DataFrame #344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kumkee
Copy link
Contributor

@kumkee kumkee commented Jan 11, 2023

Here Table.df is initialized as an empty DataFrame instead of None. This is for language servers to understand what members it might contain. For example, in the following line of code,

are_table_rows: List[bool] = [True] * table.df.shape[0]

Pyright complaints Cannot access member "shape" for type "None". Such misunderstanding would not occur with the simple fix I suggest here.

Here Table.df is initialized as an empty DataFrame instead of None.
This is for language servers to understand what members it might contain.
For example, in the following line of code,
```
are_table_rows: List[bool] = [True] * table.df.shape[0]
```
Pyright complaints `Cannot access member "shape" for type "None"`.
Such misunderstanding would not occur with this commit.
@MartinThoma
Copy link
Collaborator

Hey!

As camelot is dead, we try to build a maintained fork at pypdf_table_extraction.

Do you want to open the PR against that branch so that we can merge your improvement?

@kumkee
Copy link
Contributor Author

kumkee commented Feb 25, 2024

Hey!

As camelot is dead, we try to build a maintained fork at pypdf_table_extraction.

Do you want to open the PR against that branch so that we can merge your improvement?

Absolutely!

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 this pull request may close these issues.

2 participants