Commit Graph

262 Commits (4a7e6bc068e75c61f5ce4333bbda46f2f1431cbf)

Author SHA1 Message Date
epenet c55a4e9584
Cleanup pylint obsolete import checks (#131904) 2024-12-01 16:49:51 +01:00
J. Nick Koston 6eb49991a4
Add pylint rule for cached_property (#127482) 2024-10-03 17:53:55 -05:00
epenet 083b586d19
Add pylint checks for fixture scope (#126723)
* Prevent session scope fixtures in component tests

* Link message to the decorator - not the function

* Add checks for package also

* Add check for session scope autouse

* Rename variable

* Adjust message

* Ignore fancy autouse

* Simplify
2024-09-25 15:27:57 +02:00
epenet 49efa4d47b
Add specific EntityDescription to describe calendar entities (#126726) 2024-09-25 11:57:11 +02:00
epenet dff0e2cc9f
Move pylint decorator plugin and add tests (#126719) 2024-09-25 09:41:23 +02:00
epenet 1adaaf49cc
Add specific EntityDescription to describe device tracker entities (#126586)
* Add TrackerEntityDescription to describe tracker entities

* Improve

* Adjust components

* Add ScannerEntityDescription

* Simplify

* Revert

* Set TrackerEntity default source type to SourceType.GPS

* Fix rebase

* Adjust default

* Remove source_type from EntityDescription

* Fix rebase

* Docstring

* Remove BaseTrackerEntityDescription
2024-09-25 07:28:29 +02:00
epenet 2a0c779a02
Avoid raw string in device_tracker source_type (#126601) 2024-09-24 23:01:47 +02:00
epenet acebf1fb48
Adjust _ENTITY_COMPONENTS in hass-enforce-class-module (#126603) 2024-09-24 12:19:39 +02:00
epenet 61ff40c299
Add base Entity classes to enforce-class-module pylint plugin (#126473) 2024-09-24 08:52:07 +02:00
epenet 9b96bc32eb
Add derived Entity classes in hass-enforce-class-module pylint plugin (#126494) 2024-09-23 21:03:29 +02:00
epenet 788d9571b5
Add entity components to hass-enforce-class-module pylint plugin (#126545) 2024-09-23 19:35:48 +02:00
epenet c759512c70
Prevent callback decorator on coroutine functions (#126429)
* Prevent callback decorator on async functions

* Adjust

* Adjust

* Adjust components

* Adjust tests

* Rename

* One more

* Adjust

* Adjust again

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-23 02:55:55 +02: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 5864591150
Mark tag as entity component in pylint plugin (#126183)
* Move tag base entity to separate module

* Add tag to _ENTITY_COMPONENTS

* Move Entity back in

* Add tag to base platforms

* Adjust core_files

* Revert "Adjust core_files"

This reverts commit 180c5034de.

* Revert "Add tag to base platforms"

This reverts commit 381bcf12f0.
2024-09-19 13:28:09 +02:00
epenet 6bc2d11c5e
Add base Entity class to enforce-class-module pylint plugin (#126026)
* Add base Entity class to enforcé-class-module pylint plugin

* Ignore bluetooth

* Ignore hue

* Ignore dominos

* Ignore ffmpeg

* Ignore mqtt

* Ignore microsoft_face

* Ignore plant

* Ignore point

* Ignore rfxtrx

* Ignore template

* Ignore tag

* Ignore deconz
2024-09-18 20:38:45 +02:00
epenet 18e2c2f6dd
Disable pylint ignore_missing_annotations in config flow (#125322)
* Disable pylint ignore_missing_annotations in config flow

* Add tests

* Ignore point
2024-09-16 11:53:29 +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 457f63cce0
Add platform Entity classes to pylint plugin (#125737)
* Add platform Entity classes to pylint plugin

* Fix violations

* Fix violations

* More

* Allow component package with same name as a platform

* One more
2024-09-16 10:10:53 +02:00
epenet c33ba541b0
Add flexibility to HassEnforceClassModule (#125739)
* Add flexibility to HassEnforceClassModule

* Adjust
2024-09-11 15:11:03 +02:00
epenet c4b870bfd3
Add EntityDescription classes to pylint plugin (#125596)
* Add EntityDescription classes to pylint plugin

* Ignore existing violations

* Adjust
2024-09-11 11:30:35 +02:00
epenet 44ca43c7ee
Add pylint check for DOMAIN alias (#125559) 2024-09-10 20:41:04 +02:00
epenet 7e2e3c4780
Rename HassEnforceCoordinatorModule (#125592) 2024-09-10 08:40:49 +02:00
G Johansson dd52f4c84a
Remove deprecated mailbox platform (#123740)
* Remove deprecated mailbox platform

* Remove from const

* Remove from type hints

* Remove from pyproject
2024-08-28 16:41:23 +02:00
Erik Montnemery ce2ffde22e
Update sensor recorder tests to async (#124061) 2024-08-18 13:20:58 -05:00
epenet e4731c07cb
Add monkeypatch to enforce-type-hints plugin (#121051) 2024-07-05 11:35:56 +02:00
Erik Montnemery 5029da6919
Make the async_setup_recorder_instance fixture a context manager (#121086) 2024-07-03 14:05:34 -05:00
epenet 1332e39f9e
Cleanup deprecated json utils (#121069)
* Cleanup deprectated json utils

* Adjust pylint
2024-07-03 15:57:32 +02:00
epenet f4b76406f2
Add capsys to enforce-type-hints plugin (#120653) 2024-06-27 19:54:44 +02:00
epenet 28e72753ad
Prevent importing PLATFORM_SCHEMA/_BASE from config validation (#120571) 2024-06-27 06:31:22 +02:00
Erik Montnemery e32a27a8ff
Remove hass_recorder test fixture (#120295) 2024-06-24 11:14:08 +02:00
Robert Resch bae008b0e2
Remove legacy_api_password auth provider (#119976) 2024-06-19 22:46:30 +02:00
epenet d9b3ee35a0
Fix typo in pylint plugin (#119362) 2024-06-11 15:01:14 +02:00
epenet 5166426d0a
Add type hints for service_calls fixture in pylint plugin (#118356) 2024-06-08 16:32:27 +02:00
epenet 7eda8aafc8
Ignore nested functions when enforcing type hints in tests (#118948) 2024-06-06 10:43:31 +02:00
epenet b54a68750b
Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
epenet 5d594a509c
Add type hints for MockAgent in conversation tests (#118701) 2024-06-03 17:44:13 +02:00
epenet f178467b0e
Add type hints for TTS test fixtures (#118704) 2024-06-03 17:43:18 +02:00
epenet 37fc16d7b6
Fix incorrect `patch` type hint in main conftest (#118461) 2024-06-02 15:34:30 +02:00
epenet 0974ea9a5a
Adjust "hass" type hint for test fixtures in pylint plugin (#118548)
Adjust "hass" type hint in pylint plugin
2024-05-31 13:06:49 +02:00
epenet 7e1f4cd3fb
Check fixtures for type hints in pylint plugin (#118313)
* Check fixtures for type hints in pylint plugin

* Apply suggestion
2024-05-31 12:42:42 +02:00
epenet ec4545ce4a
Small performance improvement to pylint plugin (#118475)
* Small improvement to pylint plugin

* Adjust

* Improve

* Rename variable and drop used argument
2024-05-31 12:03:29 +02:00
epenet 7804076064
Drop single-use constant from pylint plugin (#118540)
* Drop single-use constant from pylint plugin

* Typo
2024-05-31 11:18:55 +02:00
epenet a5dc4cb1c7
Fix incorrect `zeroconf` type hint in tests (#118465)
* Fix incorrect `mock_async_zeroconf` type hint

* Adjust thread

* One more

* Fix mock_zeroconf also

* Adjust

* Adjust
2024-05-30 21:57:09 +02:00
epenet 06251d403a
Fix special case in pylint type hint plugin (#118454)
* Fix special case in pylint type hint plugin

* Simplify

* Simplify

* Simplify

* Apply

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

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-05-30 10:41:32 +02:00
epenet 9221eeb2f7
Add check for usefixtures decorator in pylint plugin (#118456) 2024-05-30 08:54:56 +02:00
epenet baaf16e9b3
Adjust type hint for request_mock.Mocker in pylint plugin (#118458) 2024-05-30 08:53:42 +02:00
epenet a59621bf9e
Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +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
epenet 73ed49e4b7
Remove ignore-wrong-coordinator-module in pylint CI (#117479) 2024-05-15 11:51:14 +02:00
Marc Mueller dace9b32de
Store runtime data inside ConfigEntry (#115669) 2024-04-30 11:29:43 +02:00