1
0
mirror of https://github.com/home-assistant/core.git synced 2025-05-05 22:49:17 +00:00

52 Commits

Author SHA1 Message Date
Sid
a5b609f081
Enable ruff TRY401 ()
* Enable ruff TRY401

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

---------

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 ()
* 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 () 2023-11-17 13:01:06 +01:00
Marc Mueller
ba91aaa28d
Add support for Python 3.12 () 2023-10-10 21:34:49 +02:00
Marc Mueller
e163e00acd
Update RestrictedPython to 6.2 () 2023-09-08 18:51:26 -05:00
Joost Lekkerkerker
b367c95c81
Add more common translations ()
* 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 () 2023-07-12 01:08:31 +02:00
Franck Nijhof
90d839724c
Migrate integration services (N-P) to support translations () 2023-07-12 00:33:37 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap () 2023-06-27 17:42:46 +02:00
J. Nick Koston
7995d3777a
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

* 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 () 2023-02-08 20:13:46 +01:00
Franck Nijhof
79b52a2b41
Stricter pylint message control () 2023-01-20 13:47:55 +01:00
Ville Skyttä
dfa9f0e11d
Upgrade RestrictedPython to 6.0 ()
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] ()
* 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 () 2022-01-28 13:37:53 -08:00
epenet
0d7b531285
Add init type hints [p-q] ()
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] ()
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 () 2021-11-28 16:34:15 +01:00
Franck Nijhof
23cb396aad
Upgrade restrictedpython to 5.2a1.dev0 () 2021-11-04 14:52:57 +01:00
rjulius23
7d29eb282b
Add enumerate to builtins in python_script component () 2021-08-07 22:02:20 -07:00
Marc Mueller
10bfc78365
Fix missing encoding with open() ()
* 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 ()
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 ()
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) () 2020-12-14 10:06:21 +01:00
jaydesl
f92ebde75a
Add more builtins to safe list (python_script) () 2020-10-22 09:59:49 +02:00
Franck Nijhof
7653dc947a
Enable pylint unnecessary-pass ()
* 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 ()
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 () 2020-04-03 12:58:19 -07:00
Franck Nijhof
bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal () 2020-01-07 20:58:49 +01:00
Franck Nijhof
dc02c28891 Correct names in manifests (M-P) () 2020-01-07 13:28:35 +01:00
Franck Nijhof
a84741392b
Format all manifests with prettier () 2020-01-06 21:28:23 +01:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations () 2020-01-02 21:17:10 +02:00
Louis-Dominique Dubeau
33cbb398ad Don't use the locals parameter on exec. ()
Using the locals parameter makes it so that the code of a Python script runs as
if it were in the body of a ``class``. One effect of this is that functions
defined as part of a script cannot call one another directly.

Fixes: , 
2019-12-16 09:39:20 +01:00
springstan
8baba2e33d Move imports to top for python_script () 2019-12-03 00:53:04 +01:00
Ville Skyttä
99c7608fb4 Lint config cleanups ()
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Franck Nijhof
c7da781efc Update documentation link URL for integrations in all manifests () 2019-10-02 09:25:44 -07:00
Franck Nijhof
c8fb7ce98b Bump restrictedpython to 5.0 () 2019-09-19 14:30:25 -07:00
Franck Nijhof
decf13b948 Use literal string interpolation in core (f-strings) () 2019-08-23 09:53:33 -07:00
Jeff Irion
aff151c90a Load user-provided descriptions for python_scripts ()
* Load user-provided descriptions for python_scripts

* Import SERVICE_DESCRIPTION_CACHE

* Use async_set_service_schema to register service descriptions

* Add python_script tests for loading service descriptions

* Use async/await in test
2019-08-22 11:01:56 -07:00
Fabian Affolter
74b6b8a9f6 Upgrade restrictedpython to 4.0 () 2019-08-16 16:16:42 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Alok Saboo
0eb8c77889 Create services.yaml for python_script and script ()
* Create services.yaml for python_script

* Create services.yaml for script
2019-04-18 13:10:25 -07:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements ()
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd30889bad5adc9a4fd60059d05ba5a7.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2cc53cbe6954f940062b18ae34b05621.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen
cfe4cf30ad
Add manifests ()
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Tobias Sauerwein
048b100eea Clean up docstrings ()
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Daniel Høyer Iversen
519315f9c8 pylint 2.3.0 ()
* pylint 2.3.0

* remove const

*  disable=syntax-error
2019-02-27 16:10:40 -05:00