Skip to content

Remove unnecessary partial() wrapper from MiotValueType.Bool#2047

Merged
syssi merged 1 commit into
rytilahti:masterfrom
sca075:patch-1
Jun 27, 2026
Merged

Remove unnecessary partial() wrapper from MiotValueType.Bool#2047
syssi merged 1 commit into
rytilahti:masterfrom
sca075:patch-1

Conversation

@sca075

@sca075 sca075 commented Oct 12, 2025

Copy link
Copy Markdown
Contributor

Updated Bool member assignment to use _str2bool directly for future decorator compatibility.

Fixes #2028

/usr/local/lib/python3.13/site-packages/miio/miot_device.py:23: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior Bool = partial(_str2bool)

Updated Bool member assignment to use _str2bool directly for future decorator compatibility.
@syssi

syssi commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2028

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.30%. Comparing base (b2b6ec7) to head (1caae50).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2047      +/-   ##
==========================================
- Coverage   83.30%   83.30%   -0.01%     
==========================================
  Files         198      198              
  Lines       19437    19436       -1     
  Branches     1056     1056              
==========================================
- Hits        16192    16191       -1     
  Misses       3063     3063              
  Partials      182      182              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@syssi syssi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Thanks for your effort and patience! :-)

@syssi syssi changed the title Refactor Bool member assignment in miot_device.py Remove unnecessary partial() wrapper from MiotValueType.Bool Jun 27, 2026
@syssi syssi merged commit f697e85 into rytilahti:master Jun 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants