You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pyright complains this line Cannot access member "shape" for type "None"
Expected behavior
The line above should pass all language server test.
Code
import camelot
@cache
def get_table_rows(table: Table) -> List[int]:
"""Get rows with table content."""
are_table_rows: List[bool] = [True] * table.df.shape[0]
for col_idx in (df := table.df):
are_table_rows = [
a and b for a, b in zip(are_table_rows, df[col_idx] != '')
]
return [i for i in df.index if are_table_rows[I]]
Describe the bug
Language Servers, Pyright for example, complain
Cannot access member "shape" for type "None"
Steps to reproduce the bug
Pyright complains this line
Cannot access member "shape" for type "None"
Expected behavior
The line above should pass all language server test.
Code
Screenshots
Environment
Additional context
The pull request I proposed changing only one line of code should resolve this issue.
The text was updated successfully, but these errors were encountered: