-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
TYP: IntervalIndex.right/left might be infered as function #41588
Comments
@simonjayhawkins spitballing here could this be related to cache_readonly not being understood as property-like? |
Unfortunately, it seems that this is currently not really possible since python's built-in I think we have the following options:
Option 2 would be the simplest option, but we might end up waiting a long time. Option 3 is a bit invasive, but it should get the job done. |
The mypy behaviour you described in python/typeshed#5987 (comment) seems clearly suboptimal. One other way you could workaround this in current code is to lie to mypy:
|
I think I tried something like that (simply |
@hauntsaninja I think you are right :) There are still many mypy errors but they are actually legitimate errors. These errors were not triggered before because anything that uses I think the best way forward is to fix the many type errors uncovered through this and then lie to mypy ( |
applies to all untyped decorators, xref #33455 |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
pyright
mypy
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 2cb9652
python : 3.9.4.final.0
python-bits : 64
OS : Linux
OS-release : 4.13.0-36-generic
Version : #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.4
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 52.0.0
Cython : None
pytest : 6.2.4
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.23.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.05.0
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : 2.7.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.3
sqlalchemy : None
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: