Commit Graph

28 Commits (c4d8cda92be330311fd83809588c7e0131d1c49b)

Author SHA1 Message Date
Artur Pragacz 1de4d0efda
Fix deprecated enums () 2025-01-14 10:04:48 +01:00
Erik Montnemery 4b56701152
Move core config class to core_config.py () 2024-10-26 07:00:31 +02:00
Erik Montnemery 0956dbb578
Rename `UnitOfConductivity` enum members ()
* Rename UnitOfConductivity enum members

* Update test snapshots
2024-10-08 14:44:01 +02:00
Erik Montnemery 904b89df80
Allow importing typing helper in core files ()
* Allow importing typing helper in core files

* Really fix the circular import

* Update test
2024-06-11 13:48:12 +02:00
Marc Mueller 8324fd5d1d
Deprecated old backports and typing aliases () 2024-04-06 13:15:30 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 ()
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 19ab3d6daf
Add empty line after module docstring [helpers + other] () 2024-03-08 10:36:11 -05:00
J. Nick Koston 1fb9cfe37e
Speed up the frame helper () 2024-03-06 20:54:09 -10:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports () 2024-01-05 11:46:45 +01:00
Erik Montnemery 9eefd95e91
Deduplicate handling of duplicated constants ()
* Deduplicate handling of duplicated constants

* Use DeprecatedConstant + DeprecatedConstantEnum

* Fixup

* Remove test cases with unnamed tuples
2024-01-04 13:25:09 +01:00
Marc Mueller c6d1f1ccc8
Fix pytest test collection warning () 2023-12-26 16:23:19 +01:00
Robert Resch ebdf7b9c8c
Deprecate some deprecated const constants ()
* Deprecate some deprecated const constants

* Improve code

* fix typing

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-23 20:18:51 +01:00
Robert Resch c4c422de79
Skip logging deprecated constant if the calling integration couldn't be indentified ()
* Add option to log only if a integreation is detected for a deprecated constant

* Require param

* Add test that log entry is not created

* typo
2023-12-21 23:19:40 +01:00
Ville Skyttä 24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts ()
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Robert Resch 5a3db078d5
Use patch.dict in deprecation test "test_check_if_deprecated_constant" () 2023-12-20 16:06:26 +01:00
Robert Resch 0e0fd39603
Add dir_with_deprecated_constants function to deprecation helper () 2023-12-19 16:37:21 +01:00
Robert Resch a4ccd6e13b
Deprecate binary sensor device class constants ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-19 12:45:32 +01:00
Erik Montnemery db51a8e1f7
Allow passing breaks_in_ha_version to deprecation helper decorators () 2023-12-04 11:52:10 +01:00
Erik Montnemery 3478666973
Use loader.async_suggest_report_issue in deprecation helper () 2023-10-06 09:51:08 +02:00
Erik Montnemery 2627abb9ef
Improve test coverage of deprecation helper () 2023-10-03 20:57:24 +02:00
Erik Montnemery ab2de18f8f
Refactor frame.get_integration_frame () 2023-10-03 19:21:27 +02:00
epenet 5f25b71df7
Add type hints to core tests () 2023-02-20 11:42:56 +01:00
Joakim Sørensen b1c2cde40b
Changes to filename and path validation ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places ()
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Bas Nijholt f60125b5c9 Sort imports according to PEP8 for 'tests' () 2019-12-09 16:52:24 +01:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Adam Mills 7dd7f509ca Add tests for deprecation helpers () 2017-05-06 10:10:48 -07:00