Commit Graph

56 Commits (dc62ef8bef3222017a2efbdec87f1b94b2041bb1)

Author SHA1 Message Date
J. Nick Koston 6eb49991a4
Add pylint rule for cached_property (#127482) 2024-10-03 17:53:55 -05:00
epenet 2062e49ae1
Improve readability in hass_imports pylint plugin (#126252)
* Improve readability in hass_imports pylint plugin

* One more

* docstring

* docstring
2024-09-20 11:10:27 +02:00
epenet 02cb6a6af7
Force root import of references from other components (#125816)
* Force root import of references from other components

* Improve

* Adjust

* Tweak exceptions

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Adjust

* More

* Ignore violations in test

* Improve
2024-09-16 11:28:42 +02:00
epenet 44ca43c7ee
Add pylint check for DOMAIN alias (#125559) 2024-09-10 20:41:04 +02:00
epenet 1332e39f9e
Cleanup deprecated json utils (#121069)
* Cleanup deprectated json utils

* Adjust pylint
2024-07-03 15:57:32 +02:00
epenet 28e72753ad
Prevent importing PLATFORM_SCHEMA/_BASE from config validation (#120571) 2024-06-27 06:31:22 +02:00
epenet 05fc7cfbde
Enforce namespace use for import conventions (#118215)
* Enforce namespace use for import conventions

* Include all registries

* Only apply to functions

* Use blacklist

* Rephrase comment

* Add async_entries_for_config_entry

* Typo

* Improve

* More core files

* Revert "More core files"

This reverts commit 9978b93706.

* Revert diagnostics amends

* Include category/floor/label registries

* Performance

* Adjust text
2024-05-28 18:15:53 +02:00
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