Commit Graph

49 Commits

Author SHA1 Message Date
Marc Mueller 816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +02:00
Marc Mueller 19ab3d6daf
Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
Marc Mueller f248b693d7
Update pylint to 3.0.0 (#101282) 2023-10-02 20:12:43 +02:00
Franck Nijhof 30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
epenet ba23816a0c
Inverse json import logic (#88099)
* Fix helpers and util

* Adjust components

* Move back errors

* Add report

* mypy

* mypy

* Assert deprecation messages

* Move test_json_loads_object

* Adjust tests

* Fix rebase

* Adjust pylint plugin

* Fix plugin

* Adjust references

* Adjust backup tests
2023-02-16 11:37:57 +01:00
epenet ccf44d58cc
Expose DEVICE_CLASS_STATE_CLASSES sensor constant (#88172) 2023-02-15 14:48:27 +01:00
Max R 156c815499
Run `flake8` on more files (#85333)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
2023-01-16 20:53:14 +01:00
epenet d6fc2d9452
Prevent use of deprecated units (#83384)
* Prevent use of deprecated units

* Adjust obsolete util

* More units

* Add FREQUENCY

* Adjust pylint ignore

* Add ELECTRIC (current/potential)

* Add TIME

* Adjust units
2022-12-21 15:24:11 +01:00
epenet 0c79a9a33d
Adjust pylint for IMPERIAL_SYSTEM deprecation (#80874)
* Adjust pylint for IMPERIAL_SYSTEM deprecation

* Use correct location

* Adjust components
2022-10-24 15:25:00 +02:00
epenet bff5d1123f
Deprecate CONF_UNIT_SYSTEM_*** constants (#80320)
* Deprecate CONF_UNIT_SYSTEM_*** constants

* Adjust pylint plugin

* Add tests

* Remove single-use function

* Revert logic change

* Revert "Revert logic change"

This reverts commit 60959a0050.

* Tweak again
2022-10-14 16:50:04 +02:00
epenet 9c3b40dad1
Deprecate conversion utilities (#78957)
* Deprecate utilities

* Deprecate distance and speed

* Add tests

* Adjust pylint

* Simplify temperature deprecation
2022-09-28 19:39:44 +02:00
epenet 4b813f2460
Adjust pylint plugin for tests directory (#78727)
* Add module_name to parametrize

* Add tests for tests directory

* Apply patch from mib1185

* Adjust plugin to allow imports from component being tested
2022-09-19 14:27:21 +02:00
epenet 0dcbc85684
Adjust relative-import plugin for tests (#78742) 2022-09-19 12:57:07 +02:00
epenet 3941290edc
Force root import of const from other components (#78014)
* Force root import of const from other components

* Add missing commit

* Add tests

* Add tests

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-09-14 14:07:57 +02:00
epenet f1c7fb7866
Adjust pylint plugin for relative imports (#78277) 2022-09-14 00:11:57 +02:00
epenet bad81c1bc9
Prevent use of deprecated media-player constants (#77937) 2022-09-13 14:20:15 +02:00
epenet b369c2f54c
Deprecate SUPPORT_* constants for color_mode (#69269)
* Deprecate SUPPORT_* constants for color_mode

* Simplify

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-09-09 11:27:16 +02:00
epenet 23168434d5
Add pylint directory to black pre-commit (#78011)
Add pylint to black CI
2022-09-08 09:14:58 +02:00
epenet 8ed689fede
Add new rule to enforce relative imports in pylint (#77358)
* Add new rule to enforce relative imports in pylint

* Early return

* Adjust components
2022-08-29 08:55:32 +02:00
epenet 38ca74b547
Adjust pylint plugin for absolute/relative imports (#77219)
* Adjust pylint plugin for absolute/relative imports

* Adjust components

* One more

* Adjust mqtt

* Adjust mqtt.DOMAIN import

* Adjust internal import

* Add tests for valid local component imports

* Adjust relative path check

* Fixes

* Fixes
2022-08-26 14:27:13 +02:00
Marc Mueller 93630cf1f8
Add missing entry for `SOURCE_TYPE_*` to hass-imports plugin (#76829) 2022-08-16 11:17:10 +02:00
Marc Mueller 91005f4694
Update pylint plugin to use TriggerActionType (#76819) 2022-08-16 11:16:33 +02:00
Marc Mueller b8f83f6c70
Use BinarySensorDeviceClass instead of deprecated constants (#76830) 2022-08-16 07:40:33 +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 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 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
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