epenet
b185de0ac0
Add base Entity to pylint checks ( #73902 )
...
* Add base entity properties
* Add special case of Mapping[xxx, Any]
* Add Mapping tests
* Add entity functions
* Adjust docstring
* Add update/async_update
2022-06-27 12:10:31 +02:00
epenet
31af4b709e
Add FanEntity type hint checks to pylint plugin ( #73801 )
...
* Add FanEntity type hint checks to pylint plugin
* Add test
* Add test
* Review comments
* Adjust tests
* Rename variable
* also test keyword_only args
* Use docstrings
* Fix tests
* Better return type
2022-06-22 12:48:23 +02:00
epenet
9fd48da132
Add lock checks to pylint type-hint plugin ( #73521 )
...
* Add ability to check kwargs type annotation
* Add checks for lock
* Add tests
* Fix components
* Fix spelling
* Revert "Fix components"
This reverts commit 121ff6dc51
.
* Adjust comment
* Add comments to TypeHintMatch
2022-06-21 18:53:31 +02:00
epenet
1b8dd3368a
Add checks for lock properties in type-hint plugin ( #73729 )
...
* Add checks for lock properties in type-hint plugin
* Adjust comment
* Simplify return-type
* Only check properties when ignore_missing_annotations is disabled
* Adjust tests
* Add comment
* Adjust docstring
2022-06-21 14:36:22 +02:00
epenet
187d56b88b
Add ability to run plugin on unannotated functions ( #73520 )
...
* Add ability to run plugin on unannotated functions
* Use options
* Adjust help text
* Add test for the option
2022-06-16 20:12:30 +02:00
epenet
ca0a185b32
Enforce config-flow type hints to get options flow ( #72831 )
...
* Enforce config-flow type hints to get options flow
* Add checks on return_type
* Fix tests
* Add tests
* Add BinOp to test
* Update tests/pylint/test_enforce_type_hints.py
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Update pylint/plugins/hass_enforce_type_hints.py
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add TypeHintMatch property
* Update pylint/plugins/hass_enforce_type_hints.py
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-06-13 11:14:30 +02:00
epenet
4c7837a576
Enforce type hints for config_flow ( #72756 )
...
* Enforce type hints for config_flow
* Keep astroid migration for another PR
* Defer elif case
* Adjust tests
* Use ancestors
* Match on single base_class
* Invert for loops
* Review comments
* slots is new in 3.10
2022-06-01 13:09:53 +02:00
Marc Mueller
4902af2f4e
Fix conftest for pylint plugin ( #72777 )
2022-06-01 09:22:47 +02:00
epenet
cf17169b0e
Refactor type-hint pylint plugin ( #72692 )
...
* Cleanup unused variable
* Adjust tests
* Refactor _METHOD_MATCH dict
* Remove duplicate function
* Early exit
* Undo object hint
* METHOD > FUNCTION
* Add comment
* Remove extend
* Remove break
* Extract __any_platform__
* Add tests
* Cache _PLATFORMS
* Adjust tests
* Review comments
* mypy
* shorthand
2022-05-31 11:20:31 +02:00
epenet
f25663067c
Enforce type hints on device_automation platform ( #72126 )
2022-05-23 18:51:40 +02:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 ( #68656 )
2022-03-25 15:14:48 -07:00
epenet
c8504bd21d
Add tests for pylint plugins ( #65436 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-03 10:01:02 +01:00
epenet
367521e369
Adjust pylint plugin to enforce device_tracker type hints ( #64903 )
...
* Adjust pylint plugin to enforce device_tracker type hints
* Use a constant for the type hint matchers
* Add tests
* Add x_of_y match
* Adjust bluetooth_tracker
* Adjust mysensors
* Adjust tile
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-25 18:21:59 +01:00