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

Breaking changes in v0.4.0 #48

Open
tensorturtle opened this issue Jan 3, 2025 · 0 comments · May be fixed by #49
Open

Breaking changes in v0.4.0 #48

tensorturtle opened this issue Jan 3, 2025 · 0 comments · May be fixed by #49
Labels
bug Something isn't working

Comments

@tensorturtle
Copy link
Contributor

tensorturtle commented Jan 3, 2025

Thanks to @bytosaur we have a more complete FTMS implementation, which were released in v0.4.0.

v0.4.0 included some undocumented breaking changes to the API, the first of which I'm documenting here.

FitnessMachineService parse_fitness_machine_feature() has a different return type and content.

6ddc15c#diff-de14e22244a39d1e79b0332a8db8660f3ce2099c46e7a4df5ecf0e493a49012dR115

Previously parse_fitness_machine_feature() returned a FitnessMachineFeature,
but now it calls parse_all_features() to return a tuple (FitnessMachineFeature, TargetSettingFeatures).

Therefore, for legacy code to work, we need to index the 0th element of the returned Tuple.

6ddc15c#diff-f85a83dec91e3b44e1518d3eb54dcd71be147857cb5cb5c07136228ed4fe704aR132

This is fine, but the function type annotation should be fixed.
Currently it's async def get_fitness_machine_feature(self) -> FitnessMachineFeature:
It should be: async def get_fitness_machine_feature(self) -> Tuple(FitnessMachineFeature, TargetSettingFeatures):

I can do that myself.

@tensorturtle tensorturtle linked a pull request Jan 9, 2025 that will close this issue
@zacharyedwardbull zacharyedwardbull added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants