69 Commits

Author SHA1 Message Date
Robert Resch
96f84b2b99 Sort homeassistant json files (#155285) 2025-10-28 10:33:10 +01:00
Marc Mueller
23e7b14eae Update RestrictedPython to 8.1 (#154870) 2025-10-20 14:46:41 +02:00
Marc Mueller
7abe289681 Add support for Python 3.14 (#153939) 2025-10-15 20:50:16 +02:00
Marc Mueller
f29b4134d2 Update RestrictedPython to 8.0 (#137075) 2025-02-01 09:15:55 -06:00
epenet
ebda2f9994 Standardize homeassistant imports in component (n-p) (#136830) 2025-01-29 12:23:49 +01:00
Joost Lekkerkerker
b4f4b06f29 Enable RUF021 (#135832) 2025-01-17 10:20:45 +01:00
G Johansson
d896b4e66a Raise ImportError in python_script (#134792) 2025-01-06 14:52:40 +01:00
G Johansson
bc22e34fc3 Add python_script to strict typing (#134822) 2025-01-05 22:22:54 -05:00
G Johansson
637614299c Fix strptime in python_script (#133159)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-12-17 12:41:18 +01:00
Marc Mueller
c3cbdd0eb9 Update RestrictedPython to 7.4 (#128039) 2024-10-09 14:17:44 -04:00
Franck Nijhof
053ff33ef9 Update RestrictedPython to 7.3 (#127130) 2024-09-30 19:53:38 +02:00
Marc Mueller
08bdf797f0 Update RestrictedPython to 7.2 (#126662) 2024-09-24 19:48:44 +02:00
Erik Montnemery
1a2d013c97 Update icons.json to new service schema part 3 (#124770) 2024-08-28 13:48:01 +02:00
epenet
0bb8c4832d Enable raise-within-try (TRY301) rule in ruff (#123351) 2024-08-12 09:16:33 +02:00
epenet
c2a23bce50 Fix implicit-return in python_script (#123004) 2024-08-01 12:20:05 +02:00
Sid
c2b3bf3fb9 Enable Ruff RET502 (#115139) 2024-05-21 22:19:33 +02:00
Sid
2cc916db6d Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
a5b609f081 Enable ruff TRY401 (#114395)
* Enable ruff TRY401

* fix tests
2024-03-29 07:20:36 +01:00
Joost Lekkerkerker
415402e7dc Add service icons to Python Scripts (#113342) 2024-03-14 13:16:12 +01:00
Marc Mueller
2c06d4fcb9 Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Aarni Koskela
5d23a1f84f Enable augmented-assignment operations in scripts (#108081) 2024-02-17 20:32:23 -05:00
Richard Kroegel
e7573c3ed4 Add python_script response (#97937)
* Add response to python_script

* Reset output to empty dict if not valid dict

* Add tests for python_script response

* Raise Exceptions on service execution

* Add info on exception type

* Raise ServiceValidationError instead of ValueError

* Raise only on return_response=True

* Fix exception logger if no service response

* Create issue if exception is not raised

* Revert "Create issue if exception is not raised"

This reverts commit a61dd8619f.

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2024-01-05 14:30:15 +01:00
Erik Montnemery
5b55c7da5f Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00
Marc Mueller
b58af167a2 Update RestrictedPython to 7.0 (#104117) 2023-11-17 13:01:06 +01:00
Marc Mueller
ba91aaa28d Add support for Python 3.12 (#101651) 2023-10-10 21:34:49 +02:00
Marc Mueller
e163e00acd Update RestrictedPython to 6.2 (#99955) 2023-09-08 18:51:26 -05:00
Joost Lekkerkerker
b367c95c81 Add more common translations (#96429)
* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations
2023-07-12 22:00:05 -04:00
Franck Nijhof
c6b36b6db4 Update RestrictedPython to 6.1 (#96358) 2023-07-12 01:08:31 +02:00
Franck Nijhof
90d839724c Migrate integration services (N-P) to support translations (#96376) 2023-07-12 00:33:37 +02:00
Franck Nijhof
3e85a29b86 Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
J. Nick Koston
7995d3777a Fix package names to match pypi index metadata (#93883)
* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* uses _

* uses -

* fix metadata
2023-05-31 21:12:53 -04:00
Erik Montnemery
5dfb9cddd6 Sort manifests 8 (#87029) 2023-02-08 20:13:46 +01:00
Franck Nijhof
79b52a2b41 Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Ville Skyttä
dfa9f0e11d Upgrade RestrictedPython to 6.0 (#85426)
Required for Python 3.11.

https://github.com/zopefoundation/RestrictedPython/blob/6.0/CHANGES.rst#60-2022-11-03
2023-01-08 20:17:39 -05:00
Marc Mueller
9b9b553521 Disable no-self-use [pylint] (#70641)
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
J. Nick Koston
5b755b74fb Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
epenet
0d7b531285 Add init type hints [p-q] (#63191)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 16:35:23 +01:00
epenet
709afc63b0 Ensure service calls are typed [m-z] (#63014)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-29 22:41:55 +01:00
Franck Nijhof
e1036f3c71 Upgrade restrictedpython to 5.2 (#60493) 2021-11-28 16:34:15 +01:00
Franck Nijhof
23cb396aad Upgrade restrictedpython to 5.2a1.dev0 (#59049) 2021-11-04 14:52:57 +01:00
rjulius23
7d29eb282b Add enumerate to builtins in python_script component (#54244) 2021-08-07 22:02:20 -07:00
Marc Mueller
10bfc78365 Fix missing encoding with open() (#53593)
* Fix missing encoding with open()

* Fix tests

* Improve open - frontend
2021-07-28 09:41:45 +02:00
Philip Allgaier
6fe04f40a2 Ensure HA script and Python script services have a name (#47204)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-03-31 15:09:45 +02: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
Mike Miller
dc1d08be70 Upgrade restrictedpython to 5.1 (needed for python 3.9 support) (#44181) 2020-12-14 10:06:21 +01:00
jaydesl
f92ebde75a Add more builtins to safe list (python_script) (#42146) 2020-10-22 09:59:49 +02:00
Franck Nijhof
7653dc947a Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
Franck Nijhof
7d3c974747 Use set & dict literals (#33636)
Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
2020-04-04 20:05:15 +02:00
Paulus Schoutsen
f1d3c0d19b Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Franck Nijhof
bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +01:00