Marc Mueller
80394e3de6
Improve `util.async_` typing ( #66510 )
2022-02-14 15:41:09 +01:00
Erik Montnemery
63680f0b36
Make util.async_.protect_loop name names ( #65493 )
2022-02-03 14:06:40 +01:00
Erik Montnemery
5a34feb7de
Don't warn on time.sleep injected by the debugger ( #65420 )
2022-02-02 08:58:14 -08:00
Matthias Alphart
dc58bc375a
Warn on`time.sleep` in event loop ( #63766 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-11 17:55:24 +01:00
Marc Mueller
f3bc9fc740
Update Python version used for pylint ( #63895 )
2022-01-11 13:41:57 +01:00
Marc Mueller
77ee72cbb9
Import Callable from collections.abc (1) ( #56775 )
2021-09-29 16:32:11 +02:00
Ville Skyttä
9864f2ef8b
String formatting cleanups ( #52937 )
2021-07-13 00:12:55 +02:00
Marc Mueller
c07646db5d
Update typing syntax ( #49480 )
...
* Update typing syntax
* Replace typing imports with ones from collections where possible
* Changes after review
2021-04-20 17:40:41 +02:00
J. Nick Koston
b50dcef94f
Block detectable I/O in the event loop ( #48387 )
...
We added a warning when this happens last April and gave developers
a year to fix the instability. We now prevent the instability by
raising RuntimeError when code attempts to do known I/O in the
event loop instead of the executor.
We now provide a suggestion on how to fix the code that is causing
the issue.
2021-03-27 08:54:49 +01:00
Marc Mueller
1dc25a5864
Bump python-typing-update to 0.3.2 ( #48303 )
...
* Bump python-version-update to 0.3.2
* Changes after update
* Fix pylint issues
2021-03-25 21:09:06 +01:00
J. Nick Koston
9f59515bb8
Fix shutdown deadlock with run_callback_threadsafe ( #45807 )
2021-02-01 10:54:39 +01:00
J. Nick Koston
94bf55e29b
Limit concurrency of async_get_integration to avoid creating extra threads ( #43085 )
...
* Limit concurrency of async_get_integration to avoid creating extra threads
Since async_get_integration is waiting on the disk most of the time
it would end up creating many new threads because the disk could
not deliver the data in time.
* pylint
2020-11-10 21:34:54 -10:00
Ville Skyttä
1bf2c4d976
Upgrade pylint to 2.6.0 ( #39363 )
2020-08-29 07:59:24 +02:00
Martin Hjelmare
3aa2de5fa5
Disable pylint invalid name for TypeVar T ( #34355 )
2020-04-17 12:51:31 -07:00
Ville Skyttä
267d98b5eb
Type hint improvements ( #33082 )
2020-04-17 11:33:58 -07:00
Paulus Schoutsen
d011b46985
Patch http.client to not do I/O in the event loop ( #34194 )
2020-04-15 15:32:10 -07:00
Ville Skyttä
445fd15f76
Drop Python 3.6 support ( #29978 )
2019-12-16 07:29:19 +01:00
Bas Nijholt
67c56c860d
Sort imports according to PEP8 for 'homeassistant' folder ( #29789 )
...
Components are already done
2019-12-09 16:42:10 +01:00
Pascal Vizeli
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Ville Skyttä
ac634d71f4
Remove no longer needed Python < 3.6 compatibility code ( #27024 )
2019-09-27 17:02:48 -07: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
Franck Nijhof
2f0eb07624
Migrate legacy typehints in core to PEP-526 ( #26403 )
...
* Migrate legacy typehints in core to PEP-526
* Fix one type
2019-09-03 20:36:04 -07:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Ville Skyttä
56841da2d3
Upgrade mypy to 0.720, turn on unreachability warnings ( #25157 )
...
* Upgrade mypy to 0.720
* Turn on mypy unreachability warnings, address raised issues
2019-07-16 15:11:38 -07:00
Ville Skyttä
a6eef22fbc
Upgrade mypy to 0.710 ( #24666 )
...
* Upgrade mypy to 0.710
* Address mypy 0.710 errors
2019-06-22 10:19:36 +03:00
Ville Skyttä
7d3a962f73
Upgrade mypy to 0.650 ( #19150 )
...
* Upgrade to 0.650
* Remove no longer needed type: ignore
2018-12-09 21:22:08 +02:00
Ville Skyttä
707b7c202d
Narrow scope of various pylint inline disables ( #15364 )
...
* Narrow scope of various pylint inline disables
* Whitespace tweaks
2018-10-10 12:17:11 +02:00
Paulus Schoutsen
1decba0052
Proactor policy fix ( #17066 )
...
* Proactor policy fix
* Backport Proactor policy for <py37
2018-10-02 09:55:37 +02:00
Jason Hu
1667481342
Use Protractor loop in Windows ( #17061 )
...
* Use Protractor loop in Windows
* Add import sys
2018-10-02 09:21:02 +02:00
Matthias Urlichs
0121e3cb04
Remove usage of "run_until_complete" ( #16617 )
...
* De-run_forever()-ization
* Use asyncio.run (or our own implementation on Python <3.7)
* hass.start is only used by tests
* setup_and_run_hass() is now async
* Add "main" async hass.run method
* move SIGINT handling to helpers/signal.py
* add flag to .run to disable hass's signal handlers
* Teach async_start and async_stop to not step on each other
(more than necessary)
* shorten over-long lines
* restore missing "import asyncio"
* move run_asyncio to homeassistant.util.async_
* LOGGER: warn => warning
* Add "force" flag to async_stop
only useful for testing
* Add 'attrs==18.2.0' to requirements_all.txt
Required for keeping requirements_test_all.txt in sync, where it is in
turn required to prevent auto-downgrading "attrs" during "pip install"
* Fixes for mypy
* Fix "mock_signal" fixture
* Revert mistaken edit
* Flake8 fixes
* mypy fixes
* pylint fix
* Revert adding attrs== to requirements_test*.txt
solved by using "pip -c"
* Rename "run" to "async_run", as per calling conventions
2018-09-19 15:40:02 +02:00
Ville Skyttä
1c42caba76
Pylint 2 useless-return fixes ( #15677 )
2018-07-25 19:35:57 +02:00
Andrey
140a874917
Add typing to homeassistant/*.py and homeassistant/util/ ( #15569 )
...
* Add typing to homeassistant/*.py and homeassistant/util/
* Fix wrong merge
* Restore iterable in OrderedSet
* Fix tests
2018-07-23 10:24:39 +02:00
Andrey
24d2261060
Add check_untyped_defs ( #15510 )
...
* Add check_untyped_defs
* Change to regular if-else
2018-07-18 00:28:44 +02:00
Ville Skyttä
b92350fb55
Lint cleanup ( #15103 )
...
* Remove unneeded inline pylint disables
* Remove unneeded noqa's
* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Otto Winter
890197e407
asyncio.ensure_future Python 3.5 ( #13141 )
2018-03-12 19:42:08 +01:00
Matthias Urlichs
f5cc40024d
Rename homeassistant.util.async to .async_ ( #13088 )
...
"async" is (going to be) a reserved word.
2018-03-11 10:01:12 -07:00