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

BUG: register_dataframe_accessor causes "Untyped class decorator obscures type of class; ignoring decorator" #58244

Closed
3 tasks done
davetapley opened this issue Apr 12, 2024 · 1 comment · Fixed by #58339
Closed
3 tasks done
Labels
Bug Typing type annotations, mypy/pyright type checking

Comments

@davetapley
Copy link
Contributor

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

@pd.api.extensions.register_dataframe_accessor("geo")
class GeoAccessor:
    ...

Issue Description

Example from the docs causes:

Untyped class decorator obscures type of class; ignoring decoratorPylance[reportUntypedClassDecorator](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportUntypedClassDecorator)

in VSCode.

Expected Behavior

No error.

Installed Versions

INSTALLED VERSIONS

commit : 4fe49b1
python : 3.11.7.final.0
python-bits : 64
OS : Linux
OS-release : 6.2.0-1019-azure
Version : #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8

pandas : 3.0.0.dev0+706.g4fe49b160e
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 69.0.3
pip : 24.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : None
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pyarrow : 14.0.1
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None

@davetapley davetapley added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 12, 2024
@davetapley
Copy link
Contributor Author

@twoertwein twoertwein added Typing type annotations, mypy/pyright type checking and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants