epenet
f9c83dd991
Add CoverEntity to pylint checks ( #74036 )
...
* Add CoverEntity to pylint checks
* Avoid false positivies on device_class
* Adjust device_class handling
* Adjust device_class again using a singleton
* Adjust device_class (again)
* Simplify DEVICE_CLASS check
* Keep device_class in base class
2022-06-27 14:58:23 +02:00
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
d19fc0622b
Add ToggleEntity to pylint fan checks ( #73886 )
2022-06-23 21:31:30 +02:00
epenet
b17d4ac65c
Remove replicated async definitions in pylint plugin ( #73823 )
...
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-06-22 23:51:40 +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
f91aa33c5f
Add FlowResultType enum to data entry flow ( #72955 )
2022-06-07 22:02:44 -07:00
Marc Mueller
983a76a91c
Update pylint to 2.14.0 ( #73119 )
2022-06-06 21:43:47 +02:00
epenet
999b3a4f7b
Adjust astroid import in pylint plugin ( #72841 )
...
* import nodes from astroid
* Update remaining pylint plugins
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-06-02 07:48:59 +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
epenet
577be70da9
Add new method to pylint type-hint plugin ( #72757 )
...
Enforce type hints on remove_config_entry_device
2022-06-01 08:38:48 +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
d40cd20692
Enforce type hints for backup and cast platforms ( #72223 )
...
* Enforce backup type hints
* Enforce cast type hints
2022-05-24 16:07:18 +02:00
epenet
f25663067c
Enforce type hints on device_automation platform ( #72126 )
2022-05-23 18:51:40 +02:00
epenet
571c90b8cf
Adjust pylint plugin for climate HVACMode ( #71727 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-23 15:59:15 +02:00
epenet
ba4031718d
Enforce application_credentials type hints ( #72214 )
2022-05-20 06:25:29 +02:00
epenet
d3c25bf450
Adjust pylint plugin for climate HVACAction ( #70760 )
2022-05-13 10:40:14 +02:00
epenet
802c4c0d42
Deprecate LightEntityFeature light constants ( #69301 )
2022-04-30 16:42:22 +02:00
epenet
7894326270
Deprecate COLOR_MODE_* light constants ( #69302 )
2022-04-25 16:21:19 -10:00
epenet
34da029d48
Deprecate SUPPORT_* constants in vacuum ( #69516 )
2022-04-25 16:20:13 -10:00
Franck Nijhof
1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum ( #69861 )
2022-04-18 19:37:32 +02:00
Franck Nijhof
c93c7e8eff
Replace Camera STREAM_ constants with StreamType enum ( #69871 )
2022-04-11 16:27:27 -07:00
epenet
fa13a243d4
Deprecate SUPPORT_* constants in siren ( #69648 )
2022-04-08 16:38:57 +03:00
epenet
f0a021d255
Deprecate SUPPORT_* constants in camera ( #69481 )
2022-04-08 10:22:42 +02:00
epenet
7ce9b5910a
Deprecate SUPPORT_* constants in alarm_control_panel ( #69475 )
2022-04-07 23:28:32 +02:00
epenet
7635cafd47
Deprecate SUPPORT_* constants in cover ( #69484 )
2022-04-07 23:27:55 +02:00
epenet
5b6cb6bffd
Deprecate SUPPORT_* constants in media_player ( #69518 )
2022-04-07 23:26:09 +02:00
epenet
6feeece574
Deprecate SUPPORT_* constants in climate ( #69482 )
2022-04-07 23:25:14 +02:00
epenet
15348965f3
Deprecate SUPPORT_* constants in fan ( #69514 )
2022-04-07 23:23:29 +02:00
epenet
075c362fd7
Deprecate SUPPORT_* constants in humidifier ( #69519 )
2022-04-07 15:36:16 +02:00
epenet
381e669b64
Deprecate SUPPORT_* constants in water-heater ( #69512 )
2022-04-07 15:33:09 +02:00
epenet
3c57adefdb
Deprecate SUPPORT_* constants in lock ( #69513 )
2022-04-07 14:14:38 +02:00
epenet
d614ccd161
Deprecate SUPPORT_* constants in remote ( #69515 )
2022-04-07 09:42:36 +02:00
epenet
d0288f14f0
Add sensor DEVICE_CLASS_* to deprecated imports ( #69243 )
2022-04-04 15:03:28 -07:00
epenet
9ef67c4b4c
Add more constants to deprecated imports ( #69253 )
...
* Add core ENTITY_CATEGORY_* to deprecated imports
* Alphabetical order
* Add core SOURCE_* to deprecated imports
* Add switch DEVICE_CLASS_* to deprecated imports
* Add binary_sensor DEVICE_CLASS_* to deprecated imports
* Add humidifier DEVICE_CLASS_* to deprecated imports
* Add config_entries.DISABLED_***
* Add device_registry.DISABLED_***
* Add humidifier.const
* Add media_player DEVICE_CLASS_*
* Add cover DEVICE_CLASS_*
2022-04-04 19:48:14 +02:00
epenet
76247414bf
Add pylint plugin for deprecated STATE_CLASS_* ( #69237 )
2022-04-04 11:45:53 +02:00
Marc Mueller
ab67ba20f5
Update pylint plugin to validate `_async_has_devices` ( #66512 )
2022-02-14 18:10:50 +01:00
Marc Mueller
ac7e8c40a3
Remove homeassistant import [pylint plugin] ( #65911 )
2022-02-06 18:36:02 +01:00
epenet
cc7680b0c3
Adjust pylint plugin to enforce diagnostics type hints ( #64976 )
...
* Adjust pylint plugin to enforce diagnostics type hints
* Adjust return_type
* Set return_type to UNDEFINED
* Use Any for the expected data
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-03 19:22:43 +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
epenet
78e92d1662
Adjust pylint plugin to enforce platform type hints ( #64836 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-24 18:51:06 +01:00
epenet
11fa86cc83
Add pylint plugin to enforce type hints ( #64313 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-24 13:38:56 +01:00
Ruslan Sayfutdinov
55f4962c06
Fix pylint plugin which checks relative imports ( #62693 )
2021-12-23 11:14:47 -08:00
Ruslan Sayfutdinov
016abda12e
Pylint plugin to check that relative imports are used ( #50937 )
...
* Pylint plugin to check that relative imports are used
* Fix existing sites
* Update description message
* Fix typo
2021-05-22 09:15:30 +01:00
Ruslan Sayfutdinov
0e7409e617
Pylint plugin to check __init__ return type ( #50868 )
...
* Pylint plugin to check __init__ return type
* Support *args add **kwargs, type hints
* Use 'in' instead of 'any()'
* Fix last few places
2021-05-20 18:00:10 +01:00
J. Nick Koston
c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period ( #48064 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00