Skip to content

Consolidate duplicated logic related to request counts json data#77

Merged
jhansche merged 1 commit intojhansche:mainfrom
jsheputis:enhancement/75-command-count-polling-refactor
May 30, 2025
Merged

Consolidate duplicated logic related to request counts json data#77
jhansche merged 1 commit intojhansche:mainfrom
jsheputis:enhancement/75-command-count-polling-refactor

Conversation

@jsheputis
Copy link
Contributor

No description provided.

Copy link
Owner

@jhansche jhansche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

def update_non_empty(self, data) -> None:
"""Update this object with non-empty data from `data`."""
if (api_request_counts := data.pop("tesla_request_counter", {})):
super().update(api_request_counts)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also flatten this into data so it's only one call to super 🤷‍♂️

@jhansche jhansche merged commit 50d6c5f into jhansche:main May 30, 2025
3 checks passed
@jsheputis jsheputis deleted the enhancement/75-command-count-polling-refactor branch June 19, 2025 01:41
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