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

[ENH] changing Union[int | float] to float as per issue #4379 #4575

Merged
merged 2 commits into from
May 12, 2023

Conversation

mdsaad2305
Copy link
Contributor

@mdsaad2305 mdsaad2305 commented May 11, 2023

Reference Issues/PRs

Fixes #4379

in type annotations, replaces all instances of Union[int | float] (either way round) with float

What does this implement/fix? Explain your changes.

This is my first contribution.
replacing Union[int | float] to just float

@mdsaad2305 mdsaad2305 requested a review from fkiraly as a code owner May 11, 2023 17:03
@mdsaad2305 mdsaad2305 changed the title changing Union[int | float] to float as per issue #4379 [DOC] changing Union[int | float] to float as per issue #4379 May 11, 2023
@mdsaad2305 mdsaad2305 changed the title [DOC] changing Union[int | float] to float as per issue #4379 changing Union[int | float] to float as per issue #4379 May 11, 2023
@mdsaad2305 mdsaad2305 changed the title changing Union[int | float] to float as per issue #4379 [ENH] changing Union[int | float] to float as per issue #4379 May 11, 2023
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Thanks!

There are a lot of other occurrences of Union[int, float], so it would be great if you could also take care of those - simply use vs code or pycharm search all files functionality.

@mdsaad2305
Copy link
Contributor Author

Will make the necessary changes

@mdsaad2305
Copy link
Contributor Author

mdsaad2305 commented May 11, 2023

I think these are the only occurrences of Union[float, int] and Union[int, float]. Furthermore, I recall the flake8 test failing during pre-commit due to the import statements, so I removed them. More codes were similar to Union[float, int] but had more datatypes inside, not just float and int.

@mdsaad2305 mdsaad2305 requested a review from fkiraly May 11, 2023 20:44
@fkiraly
Copy link
Collaborator

fkiraly commented May 12, 2023

I think these are the only occurrences of Union[float, int] and Union[int, float].

Yes, I think you got all of them, thanks!

Copy link
Collaborator

@fkiraly fkiraly 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!

@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label May 12, 2023
@fkiraly fkiraly merged commit 005044b into sktime:main May 12, 2023
4 checks passed
@mdsaad2305 mdsaad2305 deleted the first-contribution branch May 12, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH] simplify type annotations for float
2 participants