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

Add config alias to CharmBase #419

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

johnsca
Copy link
Contributor

@johnsca johnsca commented Sep 30, 2020

As discussed on Discourse, using self.model.config can cause the charm author to believe they are accessing the model-level config. It's also extra typing for something that is going to be frequently accessed, so like the other frequently accessed attributes like self.app, self.unit, etc, a self.config alias seems easier and less likely to lead to confusion.

As discussed on [Discourse][], using `self.model.config` can cause the
charm author to believe they are accessing the model-level config. It's
also extra typing for something that is going to be frequently accessed,
so like the other frequently accessed attributes like `self.app`,
`self.unit`, etc, a `self.config` alias seems easier and less likely to
lead to confusion.

[Discourse]: https://discourse.juju.is/t/first-steps-with-the-operator-framework/3006/12
@chipaca chipaca merged commit d97d4a5 into canonical:master Oct 2, 2020
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