Make pandas.ExcelFile(...)
in stubs consistent with the run time version.
#1117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pandas.ExcelFile(...)
in stubs is not consistent with the run-time signature. #1116assert_type()
to assert the type of any return valuepytest
in my local environment.Introduction
The changes make the signature of
pandas-stubs/pandas-stubs/io/excel/_base.pyi
Lines 246 to 251 in 4976e11
consistent with the run time version:
https://github.com/pandas-dev/pandas/blob/0691c5cf90477d3503834d983f69350f250a6ff7/pandas/io/excel/_base.py#L1507-L1513
Fixes
path_or_buffer
, notio
. (The propertyExcelFile(...).io
is correct. No need to change this.)engine_kwargs
is added.The keywordSorry, I found thatstorage_options
should allow aNone
value.None
case has been included here. No need to make changes for this.