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

Make Configuration object return boolean values #647

Closed
ocelotl opened this issue May 4, 2020 · 1 comment · Fixed by #662
Closed

Make Configuration object return boolean values #647

ocelotl opened this issue May 4, 2020 · 1 comment · Fixed by #662
Assignees
Labels
api Affects the API package.

Comments

@ocelotl
Copy link
Contributor

ocelotl commented May 4, 2020

Many times, configuration values are just boolean values. The Configuration object now only returns the literal configuration value. It would be useful to have this object return True instead of "True" to keep code a bit shorter
We could have this:

if Configuration().SOME_CONFIGURATION:
    ...

Instead of this:

if Configuration().SOME_CONFIGURATION == "True":
    ...
@ocelotl ocelotl added the api Affects the API package. label May 4, 2020
@ocelotl ocelotl self-assigned this May 4, 2020
@mauriciovasquezbernal
Copy link
Member

What about integer types as well?

ocelotl added a commit to ocelotl/opentelemetry-python that referenced this issue May 8, 2020
ocelotl added a commit to ocelotl/opentelemetry-python that referenced this issue May 19, 2020
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the API package.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants