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
dff0e2cc9f
Move pylint decorator plugin and add tests ( #126719 )
2024-09-25 09:41:23 +02:00
epenet
61ff40c299
Add base Entity classes to enforce-class-module pylint plugin ( #126473 )
2024-09-24 08:52:07 +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
epenet
f4b76406f2
Add capsys to enforce-type-hints plugin ( #120653 )
2024-06-27 19:54:44 +02:00
epenet
7eda8aafc8
Ignore nested functions when enforcing type hints in tests ( #118948 )
2024-06-06 10:43:31 +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
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
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
dace9b32de
Store runtime data inside ConfigEntry ( #115669 )
2024-04-30 11:29:43 +02:00
Erik Montnemery
0425b7aa6d
Reduce scope of test fixtures for the pylint plugin tests ( #116207 )
2024-04-29 08:21:31 +02:00
Marc Mueller
3929273b41
Allow float for int argument type [pylint plugin] ( #114105 )
2024-03-27 11:51:27 +01:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ( #112690 )
...
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) ( #112750 )
2024-03-08 20:38:34 +01:00
Marc Mueller
19ab3d6daf
Add empty line after module docstring [helpers + other] ( #112707 )
2024-03-08 10:36:11 -05:00
Erik Montnemery
3a5e0c14bf
Remove config flow specifics from FlowResult ( #111932 )
...
* Remove config flow specifics from FlowResult
* Improve docstring
* Update pylint rules
2024-03-01 13:07:13 +01:00
Erik Montnemery
a0e558c457
Add generic classes BaseFlowHandler and BaseFlowManager ( #111814 )
...
* Add generic classes BaseFlowHandler and BaseFlowManager
* Migrate zwave_js
* Update tests
* Update tests
* Address review comments
2024-02-29 16:52:39 +01:00
Jan-Philipp Benecke
1c5be598f5
Run pylint sorted platform check also when platform has type annotations ( #111407 )
2024-02-25 21:18:07 +01:00
Jan-Philipp Benecke
95aea1488d
Add pylint plugin to check if coordinator is placed in its own module ( #108174 )
...
* Add pylint plugin to check if coordinator is placed in its own module
* Remove unintended changes
* Remove pylint disable and let CI only fail on W,E,F
* Make check conventional
* Apply review suggestion
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use option instead
* Remove pylint arguments from pre-commit
* Partially revert "Remove pylint disable and let CI only fail on W,E,F"
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-29 10:30:19 +01:00
Jan-Philipp Benecke
28281523ec
Add pylint plugin to check for sorted platforms list ( #108115 )
2024-01-16 09:47:53 +01:00
Marc Mueller
37288d7788
Add pylint plugin to check for calls to base implementation ( #100432 )
2023-09-18 13:39:36 -05:00
Marc Mueller
274507b5c9
Fix pylint plugin test DeprecationWarning ( #99711 )
2023-09-06 11:35:57 +02:00
Marc Mueller
9d9af0c884
Fix pylint DeprecationWarnings ( #97627 )
2023-08-02 20:30:41 +02:00
epenet
c193402ba7
Remove incorrect ignore in pylint plugin ( #90024 )
...
* Remove incorrect ignore_missing_annotations
* Allow tuple[int, int] in hs_color
* Adjust notify targets
* Always check for return type inheritance
* Adjust tests
* Revert "Always check for return type inheritance"
This reverts commit 3528742adf98edc6481f2c954c032ace881e1d6e.
* Revert "Allow tuple[int, int] in hs_color"
This reverts commit d51c1731eff3d59b9e94e7a7e914933ceaf8e34f.
* Revert "Adjust notify targets"
This reverts commit 4cba77a7309dc89980e29d6d5b9107d9e55f7070.
2023-03-27 13:53:14 +02:00
epenet
c075dac916
Fix pylint plugin for tuple[float, float] returns ( #90047 )
2023-03-26 19:54:21 +02:00
epenet
6e92dac61f
Adjust pylint plugin for return type inheritance ( #90046 )
2023-03-26 18:37:26 +02:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ( #88165 )
...
* Enable Ruff PT006
* Adjust existing cases
* Fix tests
* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
8f8bdac451
Fix namespace issue in pylint plugin ( #87627 )
2023-02-07 13:07:21 +01:00
epenet
30bf0634fe
Add per-file-ignore to pylint ( #86289 )
2023-01-22 17:26:24 +01:00
Franck Nijhof
c507ad86d1
Remove str from cover device class ( #83396 )
...
* Remove str from cover device class
* Fix tests
2022-12-06 16:13:29 +01: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
9fb0b3995c
Adjust pylint checks for notify get_service ( #77606 )
...
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-09-07 09:44:15 +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
epenet
fb5a67fb1f
Add vacuum checks to pylint plugin ( #76560 )
2022-08-18 19:22:08 +02:00
epenet
6243f24b05
Add media-player checks to pylint plugin ( #76675 )
...
* Add media-player checks to pylint plugin
* Fix invalid hints
* Add tests
* Adjust tests
* Add extra test
* Adjust regex
* Cleanup comment
* Move media player tests up
2022-08-15 09:48:03 +02:00
epenet
982d197ff3
Add number checks to pylint plugin ( #76457 )
...
* Add number checks to pylint plugin
* Adjust ancestor checks
* Add tests
* Add comments in tests
2022-08-10 16:30:58 +02:00
epenet
3eafe13085
Improve UI in pylint plugin ( #74157 )
...
* Adjust FlowResult result type
* Adjust tests
* Adjust return_type
* Use StrEnum for base device_class
* Add test for device_class
* Add and use SentinelValues.DEVICE_CLASS
* Remove duplicate device_class
* Cleanup return-type
* Drop inheritance check from device_class
* Add caching for class methods
* Improve tests
* Adjust duplicate checks
* Adjust tests
* Fix rebase
2022-08-02 00:03:52 +02:00