Skip to content

Conversation

@un-def
Copy link
Collaborator

@un-def un-def commented Aug 5, 2024

See: #1466

@un-def un-def requested review from jvstme and r4victor August 5, 2024 15:47
pass


class ApplyEnvVarsConfiguratorMixin(BaseApplyConfigurator):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason to inherit Mixin from BaseApplyConfigurator? I'd expect Mixin to not inherit from the base class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For type annotations only, no reason from the runtime point of view. I have no strong opinion on this, though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. I'd not depend on super to register mixin args but provide a method like register_env_args() similar to apply_env_vars() and call it from the child explicitly. It's easier to reason about and doesn't require to inherit the mixin.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree, I'll update the PR.

_CM = TypeVar("_CM", bound=CoreModel)


def is_core_model_instance(instance: Any, class_: Type[_CM]) -> TypeGuard[_CM]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't know about TypeGuard. That's cool, thanks!

@un-def un-def force-pushed the 1466_add_fleet_conf_env_vars_support_for_on_prem branch from 94a1d77 to 4d2a82b Compare August 6, 2024 07:12
@un-def un-def merged commit a3902d0 into master Aug 6, 2024
@un-def un-def deleted the 1466_add_fleet_conf_env_vars_support_for_on_prem branch August 6, 2024 08:15
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.

4 participants