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

fix: fix type annotation for default_blank #1505

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

hiro-o918
Copy link
Contributor

fix type annotation

@lavigne958
Copy link
Collaborator

Hi thank you for contributing, I'm sorry but I don't understand the issue behind your changes.

The input default_blank is here to set a value in case of blank cells, when a user wants a specific value. This is typed string so gspread can safely work knowing that all input values are strings.

Could you please explain your changes ?

@hiro-o918
Copy link
Contributor Author

@lavigne958
Sorry for slow responding.
I found default_black passed into numericise finally.
This seems that the value can accept Any value.

For my case, I want to pass pd.NA as a default value for empty data which is not str type.

@lavigne958
Copy link
Collaborator

@lavigne958 Sorry for slow responding. I found default_black passed into numericise finally. This seems that the value can accept Any value.

For my case, I want to pass pd.NA as a default value for empty data which is not str type.

I see, this is a different issue then, you request the ability to use a different type and you know the util functions numericise will work. though the upper method get_all_records will block you from using it.

Then I agree, we need to double check it does not break anything but if this works fine, I'm fine with it.

@alifeee any objection ?

@alifeee
Copy link
Collaborator

alifeee commented Aug 24, 2024

this sounds good to me

only thing to remember is that multiple functions use default_blank so they should all be updated

not sure of the need for a test since it's just typing.

@hiro-o918
Copy link
Contributor Author

@lavigne958 @alifeee
Thank you for your reviews.
I found there is no additional type annotations str for default_blank
please double check just in case

@alifeee
Copy link
Collaborator

alifeee commented Aug 30, 2024

I think you are correct! Then this is good with me :)

Copy link
Collaborator

@lavigne958 lavigne958 left a comment

Choose a reason for hiding this comment

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

thank you for this contribution, I checked I found no typing issue. I hope this helps you in the future.

@lavigne958 lavigne958 merged commit dc8d678 into burnash:master Sep 1, 2024
5 checks passed
@alifeee alifeee mentioned this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants