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

Separate function for parsing charging_end_time #384

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

rikroe
Copy link
Member

@rikroe rikroe commented Dec 12, 2021

Proposed change

This fixes edge cases of being unable to parse the fuelIndicator for chargingEndTime.
In some cases, when the timestamp was not able to be parsed correctly, UnboundLocalError could be raised.

Now, parsing is done in a separate function that is returned early if timestamp parsing fails.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to this library)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works.

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2021

Codecov Report

Merging #384 (3ad4632) into master (6f15910) will increase coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #384      +/-   ##
==========================================
+ Coverage   96.61%   96.95%   +0.34%     
==========================================
  Files           8        8              
  Lines         916      921       +5     
==========================================
+ Hits          885      893       +8     
+ Misses         31       28       -3     
Flag Coverage Δ
3.10.x 96.85% <100.00%> (+0.34%) ⬆️
3.6 96.94% <100.00%> (+0.34%) ⬆️
3.7 96.83% <100.00%> (+0.34%) ⬆️
3.8 96.84% <100.00%> (+0.34%) ⬆️
3.9 96.84% <100.00%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bimmer_connected/vehicle_status.py 99.02% <100.00%> (+1.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f15910...3ad4632. Read the comment docs.

@rikroe rikroe merged commit 34c2423 into bimmerconnected:master Dec 12, 2021
@rikroe rikroe deleted the fix-charging-end-time branch December 12, 2021 22:02
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants