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

Use new names as type hints for deprecated classes #2788

Merged
merged 8 commits into from
Jul 12, 2023
Merged

Conversation

deepyaman
Copy link
Member

@deepyaman deepyaman commented Jul 12, 2023

NOTE: Kedro datasets are moving from kedro.extras.datasets to a separate kedro-datasets package in
kedro-plugins repository. Any changes to the dataset implementations
should be done by opening a pull request in that repository.

Description

Fix to enable kedro-org/kedro-viz#1447.

Development notes

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes

Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

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

Good catch, LGTM 👍🏽

DataSetError: type[Exception]
DataSetNotFoundError: type[DatasetError]
DataSetAlreadyExistsError: type[DatasetError]
DataSetError: type[DatasetError]
Copy link
Member

Choose a reason for hiding this comment

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

Ugh, I get these come from the previous iteration... good catch

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean, I wrote them this way intentionally, I just didn't (couldn't?) know Mypy wouldn't like it when doing import DataSetError as DatasetError. I feel like the type hints are technically correct (they're basically the same as for the alias), but it seems Mypy requires that the hint be the alias when doing this sort of assignment. So, I personally don't feel it was due to an oversight/rush on the previous PR, but rather just something that comes up when adding additional functionality.

Copy link
Member

Choose a reason for hiding this comment

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

oh I understand, gotcha. thanks for the explanation

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

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

hah, it took all night

@deepyaman deepyaman enabled auto-merge (squash) July 12, 2023 14:48
@deepyaman deepyaman merged commit 5c67d6e into main Jul 12, 2023
@deepyaman deepyaman deleted the deepyaman-patch-1 branch July 12, 2023 15:24
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