-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gh-623: broaden 'names' param of read_csv Broaden the type hint for the 'names' param of read_csv (and read_table, which behaves similarly) from previous list[str], so that other valid types are accepted by mypy. * allow None as names param of read_clipboard Noticed as I found clipboard after the changes to read_csv and read_table, and it calls it, so should match - but it was missing None as an option. * broaden 'names' param of read_clipboard Match prior change to read_csv, since read_clipboard calls read_csv. * broaden 'names' param of read_excel Match prior change to read_csv, read_table, read_clipboard. * gh-605: broader usecols param type hint This fixes the pycharm tooltip problem in gh-605, as well as allowing more list-like types of strings (tuples of strings, as well as mutable sequences of strings other than list), and callables that accept hashables, not just strings. * test that read_excel accepts string for usecols * test names and usecols correctly exclude strings Strings aren't valid arguments here (except for read_excel, where we have a test now to check that this is accepted). Adding tests to make sure the type hints aren't overly wide and accept string arguments by mistake.
- Loading branch information
Showing
5 changed files
with
325 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.