General cleanups all around (janitoring)#63
Merged
Merged
General cleanups all around (janitoring)#63
Conversation
Codecov Report
@@ Coverage Diff @@
## master #63 +/- ##
===========================================
- Coverage 76.27% 62.32% -13.95%
===========================================
Files 7 8 +1
Lines 826 1136 +310
Branches 110 165 +55
===========================================
+ Hits 630 708 +78
- Misses 172 393 +221
- Partials 24 35 +11
Continue to review full report at Codecov.
|
… known ports, fix docstrings
…ethods ({set,get_icon} and set_time)
… multiple devices
…docstring coverage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The commit messages should be self-explanatory. This is based on #59, so that has to be merged before this one. If wanted, I can split this into separate PRs..
The main goal behind the changes were to follow the DRY principle (removing unnecessary rtype, return etc. documentation where we already have type hints), splitting the unittests to class-specific files (for maintainability, to allow better "run only failed tests" from IDEs, and to make it less scary), and removing some useless public methods (set_icon, get_icon, set_time are not implemented and/or not useful for anyone using the api).
This will also move
plugsfrom smartstrip to the smartdevice class under the namechildren. This way iterating over it using smartdevice reference does not require separate type casting.3e19c56 strip: rename plugs property to children and move it to smartdevice
62fe83a improve bulb tests, simplify conftest
12a2f3c bulb: raise exception on color_temp error cases instead of returning zero values
8e673c7 pyproject: include cli tool to coverage, add config for interrogate (docstring coverage)
d8e3be5 remove adjust flake8 ignores (we have no setup.py anymore)
f05defd cli: indent device output to make it more easily readable when having multiple devices
5b7c257 Revise docstrings, remove superfluous information and remove unused methods ({set,get_icon} and set_time)
e7e858d protocol: remove the port parameter from query, as there are no other known ports, fix docstrings
a2454e5 Move tests to device-type specific test files to make improvements more approachable