Commit Graph

23 Commits (6fb2e63e49f01d9eaf09c7b21122981e462e4e99)

Author SHA1 Message Date
Paulus Schoutsen f49ce5d1b4
Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-06 15:58:53 -07:00
Ville Skyttä fa4fa30461 Various string cleanups (#30435)
* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +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
Franck Nijhof b1118cb8ff Removes unnecessary else/elif blocks (#26884) 2019-09-24 13:53:03 -07:00
Ville Skyttä 54242cd65c Type hint additions (#26765) 2019-09-20 08:23:34 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä e8e84fb764 Type check homeassistant.scripts (#25464)
* Run mypy on homeassistant.scripts, disabling bunch of checks for now

* Declare async_initialize in AuthProvider

* Add some type hints

* Remove unreachable code

* Help mypy out

* Script docstring fixes
2019-07-24 13:18:40 -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
Paulus Schoutsen 179fb0f3b5
Use importlib metadata to check installed packages (#24114)
* Use importlib metadata

* Fix script

* Remove unused import

* Update requirements"
2019-05-26 11:58:42 -07:00
Jason Hu 78a806bc5c Fix script load module issue (#21763)
* Fix script load depedency

* Revert #21754
2019-03-07 16:48:14 -08:00
Johann Kellerman 90d3f517d8 Check if a script requirement is available before install (#20517)
* Check if a script requirement is available before install

* PackageLoadable

* hound

* req
2019-02-26 10:20:54 -08:00
Ville Skyttä ee696643cd Isort preparations (#16555)
* Don't treat typing as an "in-between" module for import order

That was a < 3.5 era thing.

* Tighten scope of some pylint unused-import disables

To avoid isort moving a top level one around, undesirably broadening its
scope.
2018-09-11 11:21:48 +02:00
Paulus Schoutsen 0b114f0755
Do not mount deps folder when running in virtual env (#14993)
* Do not mount deps folder when inside virtual env

* Add tests

* Fix package test
2018-06-16 10:48:41 -04:00
Paulus Schoutsen ec1c395f09 Extract requirements (#12051) 2018-01-30 12:30:47 +01:00
Nathan Henrie e525d13a5d Fix typo (#8754) 2017-07-31 09:00:09 -07:00
Martin Hjelmare 543e8bb62e Fix check for running inside venv (#8481)
* Import and use the function from pip instead of defining it
  ourselves.
* Fix tests.
2017-07-15 07:25:02 -07:00
Martin Hjelmare ba019c799a Make deps directory persistent over upgrades (#7801)
* Use pip install --user if venv not active

* Set PYTHONUSERBASE to deps directory, when installing with --user
  option.
* Reset --prefix option to workaround incompatability when installing
  with --user option. This requires pip version 8.0.0 or greater.
* Require pip version 8.0.3.
* Do not delete deps directory on home assistant upgrade.
* Fix local lib mount and check package exist.

* Update and add tests

* Fix upgrade from before version 0.46

* Extract function to get user site

* Add function(s) to package util to get user site.
* Use async subprocess for one of the functions to get user site.
* Add function to package util to check if virtual environment is
  active.
* Add and update tests.

* Update version for last removal of deps dir

* Address comments

* Rewrite package util tests with pytest

* Rewrite all existing unittest class based tests for package util as
  test functions, and capitalize pytest fixtures.
* Add test for installing with target inside venv.
2017-07-13 19:26:21 -07:00
Johann Kellerman 244f60d6cd Fix script help (#2860)
Allow `--help` to filter down to the script
2016-08-17 18:57:52 -07:00
Johann Kellerman f3376ba276 Script requirement logging, db_migrator REQUIREMENTS (#2781) 2016-08-10 13:32:07 -07:00
Johann Kellerman aadf6a7750 Handle requirements for scripts (#2765) 2016-08-09 23:54:34 -07:00
Paulus Schoutsen 6f23869a89 Fix Mac OS install script (#2691) 2016-07-31 20:58:39 -07:00
Fabian Heredia Montiel 08226a4864 Type Hints - __main__ (#2574)
* Add __main__ type hints

* Fix most errors of __main__

* Add ignore for script.run()

* Add type annotations for from_config_dict and from_config_file

* Fix errors

* Fix requirement error

* Add mypy type check to tests

* Enable travis typing check

* Messed up the tox deps

* Laxer type checker
2016-07-20 22:38:52 -07:00
Paulus Schoutsen 3447fdc76f Make scripts available via CLI (#2426)
* Rename sqlalchemy migrate script

* Add script support to CLI
2016-07-03 11:38:14 -07:00