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

Client.write_data - remove potentially dangerous default #1120

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

briantist
Copy link
Contributor

Fixes #1104

@briantist briantist added bug patch Used as part of release-drafter's version-resolver configuration client related to the hvac Client labels Dec 30, 2023
@briantist briantist added this to the 2.1.0 milestone Dec 30, 2023
@briantist briantist self-assigned this Dec 30, 2023
@briantist briantist requested a review from a team as a code owner December 30, 2023 21:28
Copy link

codecov bot commented Dec 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (27dad5b) 87.12% compared to head (eeab693) 87.38%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1120      +/-   ##
==========================================
+ Coverage   87.12%   87.38%   +0.25%     
==========================================
  Files          64       66       +2     
  Lines        3162     3227      +65     
==========================================
+ Hits         2755     2820      +65     
  Misses        407      407              
Files Coverage Δ
hvac/v1/__init__.py 90.00% <ø> (ø)

... and 3 files with indirect coverage changes

@tot19
Copy link
Contributor

tot19 commented Jan 2, 2024

Looks good to me ... Good catch. One potential addition here would be to add a test to catch future instances of this? Know you mentioned pylint, and I generally have had good experience with it.

@briantist
Copy link
Contributor Author

Thanks for the review @tot19 ! I think I will address detection separately. Before adding a fourth(!) linter/checker to the project, I will probably evaluate this open PR #1059 to add ruff. Maybe it would have caught this too, and we can reduce the number of tools. In the meantime I'll merge this one.

@briantist briantist merged commit be5e98b into hvac:main Jan 2, 2024
35 checks passed
@briantist briantist deleted the client/write-data-default branch January 2, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug client related to the hvac Client patch Used as part of release-drafter's version-resolver configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client.write_data default value {} should be changed
2 participants