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

Remove opt_chars and get_value #67

Merged
merged 5 commits into from
Mar 26, 2018
Merged

Remove opt_chars and get_value #67

merged 5 commits into from
Mar 26, 2018

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Mar 25, 2018

A bit cleanup.
Removed:

  • opt_characteristics (service)
  • add_opt_characteristics (service)
  • get_value (chars)

Breaking changes:

  • Removed add_opt_characteristic. There is no further distinction between optional and require chars during execution. All chars that have been added as optional should now simply use add_characteristic. (The loader hasn't changed.)
  • The method get_characteristic now raises a ValueError if the characteristic isn't found
  • The already deprecated method get_value was removed. Use char.value instead.

* Breaking changes: add_opt_characteristic
  * Removed opt_characteristics
* Breaking changes: get_characteristic
  * Only takes the name of the char to search for (no check_optional parameter)
  * Raises ValueError instead of return None if not found
* Breaking changes: removed get_value
  * Use char.value instead
@ikalchev
Copy link
Owner

This is just perfect.

I had doubts about removing the get_value, but we can bring it back if a use case shows up for it.

@ikalchev ikalchev merged commit 5391cd0 into ikalchev:dev Mar 26, 2018
@cdce8p cdce8p deleted the remove-opt-chars branch March 26, 2018 16:38
@cdce8p
Copy link
Contributor Author

cdce8p commented Mar 26, 2018

I don't think that it will. char.value should cover it and is more pythonic :)

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