Skip to content

Conversation

@kvn4
Copy link
Contributor

@kvn4 kvn4 commented Aug 10, 2023

na_values: Hashable
| Iterable[Hashable]
| Mapping[Hashable, Iterable[Hashable]]
| None = ...,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could remove None if you like to, it is Hashable.

@kvn4
Copy link
Contributor Author

kvn4 commented Aug 14, 2023

Hi @twoertwein and @lithomas1 thank you for the feedback. Do you know where the ellipses issue could be coming from? I only changed the na_values type hint for the read_csv() function.

@twoertwein
Copy link
Member

Hi @twoertwein and @lithomas1 thank you for the feedback. Do you know where the ellipses issue could be coming from? I only changed the na_values type hint for the read_csv() function.

You seem to have changed it :) You can always use git add --patch to confirm individual changes you want to add.

You can simply replace = ... with = None in the non-overload definition.

The easiest way to remove the test is probably git checkout <commit id from before your changes> pandas/tests/io/parser/test_na_values.py and then add and commit that.

@gfyoung gfyoung added the IO CSV read_csv, to_csv label Aug 17, 2023
@kvn4
Copy link
Contributor Author

kvn4 commented Aug 17, 2023

Hi @twoertwein do the changes I made look good?

@twoertwein
Copy link
Member

Hi @twoertwein do the changes I made look good?

Now you use = None everywhere. You want = None for the function definition that doesn't have the @overload but otherwise use = ....

It might be better to use Sequence instead of Iterable (not sure whether any iterable is accepted).

You can remove the test changes you made.

@kvn4
Copy link
Contributor Author

kvn4 commented Aug 20, 2023

Hi @twoertwein do the changes I made look good?

Now you use = None everywhere. You want = None for the function definition that doesn't have the @overload but otherwise use = ....

It might be better to use Sequence instead of Iterable (not sure whether any iterable is accepted).

You can remove the test changes you made.

Thank you for the feedback. I made the changes

@twoertwein twoertwein merged commit 7915acb into pandas-dev:main Aug 20, 2023
@twoertwein
Copy link
Member

Thanks @kvn4 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO CSV read_csv, to_csv

4 participants