Commit Graph

47 Commits

Author SHA1 Message Date
Ruslan Sayfutdinov 37466ae423
Don't ignore mypy errors by default (#49270) 2021-04-26 14:23:21 +02:00
J. Nick Koston 3fa8ffa731
Enable mccabe complexity checks in flake8 (#49616)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
J. Nick Koston e008e80bcf
Cleanup sonos (#48684)
- Remove unused code
- Use async_add_executor_job
- Enforce typing
2021-04-04 23:28:29 +02:00
Ruslan Sayfutdinov 82c94826fb
Enable strict typing for zeroconf (#48450)
* Enable strict typing for zeroconf

* Fix lutron_caseta

* Fix pylint warning

* Fix tests

* Fix xiaomi_aqara test

* Add __init__.py in homeassistant.generated module

* Restore add_job with type: ignore
2021-03-30 06:48:04 -10:00
Matthias Alphart 8fa935234a
Type check KNX integration __init__ and knx_entity (#48044) 2021-03-26 16:10:55 +01:00
Marc Mueller a1ff45cbf2
Update metadata license string (#46899) 2021-03-17 14:32:13 +01:00
J. Nick Koston a060acc2b1
Fix recorder with MSSQL (#46678)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-03-09 11:16:19 -10:00
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
J. Nick Koston 5784e14d0c
Enforce typing in bond (#47187)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-01 03:16:30 +01:00
Marc Mueller ad677b9d41
Improve Slack notify component (#45479)
* Add typing information

* Small improvments

* Use %r for exceptions
* Added exception handlers for aiohttp.ClientError
* Added testcase

* Changes after review

* Bugfixes
2021-01-25 17:03:12 -07:00
Charles Garwood d68fdbc283
Add zwave_js integration (#45020)
* Run zwave_js scaffold (#44891)

* Add zwave_js basic connection to zwave server (#44904)

* add the basic connection to zwave server

* fix name

* Fix requirements

* Fix things

* Version bump dep to 0.1.2

* fix pylint

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Bump zwave-js-server-python to 0.2.0

* Use zwave js server version check instead of fetching full state (#44943)

* Use version check instead of fetching full state

* Fix tests

* Use 0.3.0

* Also catch aiohttp client errors

* Update docstring

* Lint

* Unignore zwave_js

* Add zwave_js entity discovery basics and sensor platform (#44927)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Complete zwave_js typing (#44960)

* Type discovery

* Type init

* Type entity

* Type config flow

* Type sensor

* Require typing of zwave_js

* Complete zwave_js config flow test coverage (#44955)

* Correct zwave_js sensor device class (#44968)

* Fix zwave_js KeyError on entry setup timeout (#44966)

* Bump zwave-js-server-python to 0.5.0 (#44975)

* Remove stale callback signal from zwave_js (#44994)

* Add light platform to zwave_js integration (#44974)

* add light platform

* styling fix

* fix type hint

* Fix typing

* Update homeassistant/components/zwave_js/const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* color temp should be integer

* guard Nonetype error

* Update homeassistant/components/zwave_js/light.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/light.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* some fixes after merging

* add additional guards for None values

* adjustments for rgb lights

* Fix typing

* Fix black

* Bump zwave-js-server-python to 0.6.0

* guard value updated log

* remove value_id lookup as its no longer needed

* fiz sending white value

* Update homeassistant/components/zwave_js/light.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add zwave_js test foundation (#44983)

* Exclude text files from codespell

* Add basic dump fixture

* Add test foundation

* Fix test after rebase

* Exclude jsonl files from codespell

* Rename fixture file type to jsonl

* Update fixture path

* Fix stale docstring

* Add controller state json fixture

* Add multisensor 6 state json fixture

* Update fixtures

* Remove basic dump fixture

* Fix fixtures after library bump

* Update codeowner

* Minor cleanup Z-Wave JS (#45021)

* Update zwave_js device_info (#45023)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-11 00:08:25 +01:00
Ville Skyttä 43474762b2
Drop remaining Python < 3.8 support (#44743)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 11:47:29 +01:00
Shulyaka f744f7c34e
Add new number entity integration (#42735)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-12-02 13:50:48 +01:00
Dermot Duffy 7ad2a6be30
Add hyperion config options flow (#43673) 2020-11-30 18:38:52 +01:00
Ville Skyttä f28c3273c2
Upgrade mypy to 0.790 (#41595) 2020-10-12 19:17:30 -05:00
Ville Skyttä 3a6c9b43ab
Remove redundant flake8 max-line-length (#41596)
Disabling E501 is needed and handles it anyway.
2020-10-10 13:43:37 +02:00
Ville Skyttä cf83c6bf00
Complete Huawei LTE type hints, make mypy check them (#41503) 2020-10-08 21:02:47 +02:00
Ville Skyttä 0444f3de14
Move isort, pylint, and pytest configs to pyproject.toml (#40335) 2020-10-06 11:26:48 +02:00
Ville Skyttä 6ae9399237
Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
Ville Skyttä aa1c5fc43d
Various type hint improvements (#37952) 2020-07-22 08:06:37 -07:00
Ville Skyttä 221d5205e4
Upgrade mypy to 0.770, tighten config a bit (#32715)
* Upgrade mypy to 0.770, related cleanups

https://mypy-lang.blogspot.com/2020/03/mypy-0770-released.html

* Clean up config and make it a notch stricter, address findings
2020-03-12 11:52:20 +01:00
Ville Skyttä 445fd15f76 Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
Ville Skyttä bb37bc32e3
Always run flake8 through pre-commit, and with doctests (#28490)
* Enable flake8 doctests everywhere

* Always run flake8 through pre-commit
2019-11-06 21:38:00 +02:00
Ville Skyttä 3e6b9a17cc Run mypy in pre-commit (#27339)
* Move mypy files config to setup.cfg

* Add mypy in pre-commit
2019-10-08 14:45:24 -07:00
Paulus Schoutsen 53e6b8ade6
Add reproduce state template (#26866)
* Add reproduce state template

* Handle invalid state
2019-09-23 23:23:53 -07:00
Ville Skyttä f9b1a52259 Move mypy settings to setup.cfg (#25611) 2019-08-01 07:53:53 +02:00
Paulus Schoutsen da05dfe708 Add Black 2019-07-31 12:23:23 -07:00
Ville Skyttä 3cf8964c06 Python < 3.6 remainder cleanups (#25607) 2019-07-31 12:21:15 -07:00
Ville Skyttä 33d6c99f19 Add Python 3.7 classifier (#16645) 2018-09-24 11:11:24 +02:00
Ville Skyttä 227a1b919b More isort preparations (#16633)
* Adjust config closer to currently established style conventions

* Adjust some imports for better outcome with their comments
2018-09-19 15:40:36 +02: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
cdce8p 4c258ce08b Revert some changes to setup.py (#15248) 2018-07-01 11:48:54 -04:00
cdce8p f8bc3411ad PyPi: Fix description and setup.cfg (#15107)
* Fix description and extend use of setup.cfg

* Fix lint
2018-06-25 09:57:26 -04:00
Martin Hjelmare b904a4e770 Remove universal wheel setting (#14445)
* Home assistant should not build a universal wheel since we don't
  support Python 2.
2018-05-13 17:57:52 +02:00
Paulus Schoutsen 3f5c748560
Reorganize lint travis builds (#10670)
* tox cleanup

* 1 tox step

* Revert pytest sugar changes

* Tox: make pylint its own task

* Bump Travis to 30 minutes timeout
2017-11-19 17:39:24 -08:00
Johan Bloemberg 601193b1d2 Expose isort preferences for tools. (#4481)
* Expose isort preferences for tools.

* Adhere to pylints sorted imports requirement.

* More documentation, set typing in between stdlib and 3rd party.
2016-11-27 14:33:30 -08:00
Martin Hjelmare 34ba4d3e09 Exclude www_static from pydocstyle linting (#3175)
🐬
2016-09-03 20:21:19 -06:00
Paulus Schoutsen f802d6bfa3 Update test packages (#2918) 2016-08-21 11:44:40 -07:00
Paulus Schoutsen 8ee4503d7c Exclude tests in dependencies in test dir from pytest (#2618) 2016-07-25 08:26:07 -07:00
John Arild Berentsen 69daa383dd Exclude locally built python-openzwave from tox. (#1911)
Excludes `build` directory built by running build_python_openzwave script. When running tox test locally.
2016-04-25 12:06:28 +02:00
Jan Harkes ebf45012fb Ignore tests/config/deps/ for both git and flake8.
Sometimes py.test leave some packages around in tests/config/deps.
Make sure these do not accidentally get pulled into a commit or
cause a local tox run to fail.
2016-04-12 14:58:02 -04:00
Paulus Schoutsen 14a9b9fe3f Add pep257 checking 2016-03-09 23:34:28 -08:00
Paulus Schoutsen bade0e0d71 Make tests pass flake8 2016-02-14 13:07:21 -08:00
Dan Smith 92a11819b4 Exclude venv directories from linting
Exclude venv/ (a common virtualenv name) and bin/,lib/ if the local
directory is configured as a venv.
2016-02-14 20:20:12 +00:00
Sean Dague 97c0f5bb5a convert testing infrastructure to tox
This converts the testing infrastructure to tox for both locally
testing and travis. This is nearly equivalent to the previous testing
with the only exception that linting fails with the first tool to fail
and won't process all of them.

Slightly tricky thing is that tox resets *all* of the environment for
it's subprocess runs by default. A couple of the dependencies we have
will not install in non UTF8 locales: temper-python & XBee.
2016-02-14 13:04:42 -05:00
Paulus Schoutsen d9b30d1421 Pep257 fixes for core. 2015-12-27 21:14:35 -08:00
Paulus Schoutsen 4403fe941d Test config clean up 2015-12-27 16:31:52 -08:00