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

Refactor: Use isinstance() for type checking to enhance flexibility i… #1490

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

alphamarket
Copy link
Contributor

Refactor: Use isinstance() for type checking to enhance flexibility in workspace configuration

  • Replaced direct class name checks with isinstance() to improve extensibility and maintainability.
  • Adjusted type handling for WorkspaceSettings, DockerResources, and AwsResources to ensure compatibility with future client-side customizations.
  • Streamlined object identification in get_workspace_objects_from_file and related functions for better readability and reduced redundancy.
  • Removed unnecessary imports and consolidated resource checks to align with updated type-checking logic.

These changes make the workspace configuration process more robust and adaptable to evolving client requirements.

…n workspace configuration

- Replaced direct class name checks with `isinstance()` to improve extensibility and maintainability.
- Adjusted type handling for `WorkspaceSettings`, `DockerResources`, and `AwsResources` to ensure compatibility with future client-side customizations.
- Streamlined object identification in `get_workspace_objects_from_file` and related functions for better readability and reduced redundancy.
- Removed unnecessary imports and consolidated resource checks to align with updated type-checking logic.

These changes make the workspace configuration process more robust and adaptable to evolving client requirements.
phi/workspace/config.py Outdated Show resolved Hide resolved
phi/workspace/config.py Outdated Show resolved Hide resolved
@alphamarket
Copy link
Contributor Author

@dirkbrnd done.

Copy link
Contributor

@dirkbrnd dirkbrnd left a comment

Choose a reason for hiding this comment

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

Thanks for the addition!
LGTM

@dirkbrnd dirkbrnd merged commit f24a819 into phidatahq:main Dec 16, 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.

2 participants