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 method breaking changes 2.0.0 #1089

Merged

Conversation

briantist
Copy link
Contributor

@briantist briantist commented Oct 15, 2023

Implements:

Resolves #1079

This also adds a bunch of type hints and such, and some additional test coverage.

@briantist briantist added dependencies Pull requests that update a dependency file breaking-change client related to the hvac Client labels Oct 15, 2023
@briantist briantist added this to the 2.0.0 milestone Oct 15, 2023
@briantist briantist self-assigned this Oct 15, 2023
@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

Merging #1089 (25c5e60) into main (b8322ca) will increase coverage by 0.09%.
The diff coverage is 97.05%.

@@            Coverage Diff             @@
##             main    #1089      +/-   ##
==========================================
+ Coverage   86.99%   87.09%   +0.09%     
==========================================
  Files          64       64              
  Lines        3115     3146      +31     
==========================================
+ Hits         2710     2740      +30     
- Misses        405      406       +1     
Files Coverage Δ
hvac/v1/__init__.py 90.52% <97.05%> (+1.21%) ⬆️

@briantist briantist changed the title Client/write method breaking changes 2.0.0 Client.write method breaking changes 2.0.0 Oct 15, 2023
@briantist briantist marked this pull request as ready for review October 15, 2023 03:18
@briantist briantist requested a review from a team as a code owner October 15, 2023 03:18
@briantist
Copy link
Contributor Author

@M0NsTeRRR in case you're interested in reviewing

hvac/v1/__init__.py Outdated Show resolved Hide resolved
value = dict.pop(member)
except KeyError:
if posvalue is not _sentinel:
return posvalue
Copy link
Contributor

@M0NsTeRRR M0NsTeRRR Oct 15, 2023

Choose a reason for hiding this comment

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

Maybe its better to have only one return and do value = posvalue and for the next elif value = default for readability ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe personal preference but I prefer the return for readability, otherwise I have to follow the rest of the flow to see where the value gets used again and/or returned.

@M0NsTeRRR
Copy link
Contributor

LGTM (haven't time to test it)

@briantist briantist merged commit 8829ff2 into hvac:main Oct 15, 2023
38 checks passed
@briantist briantist deleted the client/write-method-breaking-changes-2.0.0 branch October 15, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change client related to the hvac Client dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.0.0 - implement breaking changes for Client.write method
2 participants