1
mirror of https://github.com/home-assistant/core synced 2024-09-25 00:41:32 +02:00
Commit Graph

34 Commits

Author SHA1 Message Date
Sid
6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
Marc Mueller
19ab3d6daf
Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
J. Nick Koston
6ff990e2c2
Avoid fetching logger in check_if_deprecated_constant if there is nothing to log (#107341)
getLogger needs a threading lock so its nice to avoid
calling it if we are not going to log anything
2024-01-06 10:20:30 +01:00
Erik Montnemery
c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
Erik Montnemery
9eefd95e91
Deduplicate handling of duplicated constants (#107074)
* Deduplicate handling of duplicated constants

* Use DeprecatedConstant + DeprecatedConstantEnum

* Fixup

* Remove test cases with unnamed tuples
2024-01-04 13:25:09 +01:00
Robert Resch
ebdf7b9c8c
Deprecate some deprecated const constants (#106230)
* 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 (#106181)
* 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
Robert Resch
0e0fd39603
Add dir_with_deprecated_constants function to deprecation helper (#106059) 2023-12-19 16:37:21 +01:00
Robert Resch
a4ccd6e13b
Deprecate binary sensor device class constants (#105736)
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 (#104985) 2023-12-04 11:52:10 +01:00
Erik Montnemery
34d01719f2
Minor improvements of deprecation helper (#104980) 2023-12-04 10:47:49 +01:00
Erik Montnemery
3478666973
Use loader.async_suggest_report_issue in deprecation helper (#101393) 2023-10-06 09:51:08 +02:00
Erik Montnemery
ab2de18f8f
Refactor frame.get_integration_frame (#101322) 2023-10-03 19:21:27 +02:00
Marc Mueller
45b4b0e990
Import ParamSpec from typing [Py310] (#86413)
* Import ParamSpec from typing [Py310]

* Update additional imports
2023-01-23 07:28:43 +01:00
Franck Nijhof
06a35fb7db
Code styling tweaks to core helpers (#85441) 2023-01-08 13:44:09 -10:00
Franck Nijhof
d4f69a3652
String formatting and max line length - Part 7 (#84532)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-27 11:18:56 +01:00
Marc Mueller
b04c3e9adc
Improve deprecation helper typing (#75453) 2022-07-20 02:54:46 +02:00
Marc Mueller
77ee72cbb9
Import Callable from collections.abc (1) (#56775) 2021-09-29 16:32:11 +02:00
Ville Skyttä
de6e7ea016
Replace *args and **kwargs type hint collections with value types (#54955) 2021-08-21 10:20:09 +03:00
Erik Montnemery
837220cce4
Add deprecated backwards compatible history.LazyState (#51144) 2021-05-28 11:01:28 +02:00
Erik Montnemery
d1df6e6fba
Don't get code_context when calling inspect.stack (#48849)
* Don't get code_context when calling inspect.stack

* Update homeassistant/helpers/config_validation.py
2021-04-09 07:26:09 +02:00
Marc Mueller
6fb2e63e49
Update typing 02 (#48014) 2021-03-17 18:34:19 +01:00
Joakim Sørensen
90973f471f
Add integration name to the deprecation warnings (#45901) 2021-02-03 14:40:11 +01:00
Joakim Sørensen
b1c2cde40b
Changes to filename and path validation (#45529)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
springstan
a2c3c33b22
Use core GitHub URL in all files (#41089) 2020-10-03 00:04:11 +02:00
Franck Nijhof
2e17ad86af Adds guards for missing information in call stack frames (#27217) 2019-10-05 11:59:33 +02:00
Ville Skyttä
fde128d66c
Upgrade mypy to 0.730, address raised issues (#26959)
https://mypy-lang.blogspot.com/2019/09/mypy-730-released.html
2019-09-27 22:57:59 +03:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä
9411fca955 Add more type hints to helpers (#18350)
* Add type hints to helpers.entityfilter

* Add type hints to helpers.deprecation
2018-11-11 17:39:50 +01:00
Ville Skyttä
b7c336a687 Pylint cleanups (#15626)
* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
2018-07-23 10:16:05 +02:00
Ville Skyttä
13ec8b143d Spelling fixes (#12138) 2018-02-02 22:35:34 +01:00
Anders Melchiorsen
81f0826550 Ignore attribute changes in automation trigger from/to (#7651)
* Ignore attribute changes in automation trigger from/to

* Quote names in deprecation warnings

This makes it somewhat easier to read if the suggestion happens to be
named "to".

* Add test with same state, new attribute value
2017-05-20 15:18:59 -04:00
Fabian Affolter
a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Adam Mills
e877d572f5 binary_sensor sensor_class to entity device_class (#5860)
* binary_sensor sensor_class to entity device_class

* Linter fixes

* Should be it
2017-02-10 20:46:15 -08:00