Commit Graph
100 Commits
Author SHA1 Message Date
Ville Skyttäandcgtobi f9b1a52259 Move mypy settings to setup.cfg (#25611) 2019-08-01 07:53:53 +02:00
Ville SkyttäandGitHub cfd600d72e script/test: fix tox env (#25620) 2019-08-01 08:45:58 +03:00
Ville SkyttäandPaulus Schoutsen 0490167a12 Azure flake8 dep, docstring fixes (#25605)
* Fix Azure CI flake8 deps

* Docstyle fixes
2019-07-31 12:21:36 -07:00
Ville SkyttäandPaulus Schoutsen 3cf8964c06 Python < 3.6 remainder cleanups (#25607) 2019-07-31 12:21:15 -07:00
Ville SkyttäandPascal Vizeli cc74b22ce8 Ignore .dmypy.json (#25528) 2019-07-29 11:34:19 +02:00
Ville SkyttäandMartin Hjelmare f379bb4016 huawei_lte: try unsupported data retrievals only once (#25524)
* huawei_lte: try unsupported data retrievals only once

Refs https://github.com/home-assistant/home-assistant/pull/23809

* Move huawei_lte_api imports to top level
2019-07-29 10:08:49 +02:00
Ville Skyttäandcgtobi b230562c76 Mypy config cleanups (#25475)
* Move file specific config to inline comments

* Disallow untyped defs by default everywhere
2019-07-25 08:08:20 +02:00
Ville SkyttäandPaulus Schoutsen 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äandPaulus Schoutsen 408af6e842 Install requirements_test.txt for flake8 in Azure CI (#25463)
Was missing specified versions, as well as flake8-docstrings altogether.
2019-07-24 08:36:52 -07:00
Ville SkyttäandPaulus Schoutsen cd0277c2c3 Lint fixes (#25462) 2019-07-24 08:26:41 -07:00
Ville SkyttäandGitHub f07c714c01 Huawei LTE misc improvements (#25377)
* Rename traffic_statistics to monitoring_traffic_statistics

For better consistency with huawei-lte-api.

* Add default device name for sensors

In case the actual device name cannot be accessed for some reason.

* Support device class in sensor metadata

* Mark known signal strength sensors as such
2019-07-24 07:24:22 +03:00
Ville SkyttäandPaulus Schoutsen 17d754dbbf Optional and Union simplifications (#25365) 2019-07-21 10:59:51 -07:00
Ville SkyttäandPaulus Schoutsen d64f1e767c Type check all helpers (#25373)
* Type check all helpers, add inline exclusions for work in progress

* Remove unused Script._template_cache

* Add some missing type hints

* Remove unneeded type: ignore

* Type hint fixes

* Mypy assistance tweaks

* Don't look for None in deprecated config "at most once" check

* Avoid None name slugify attempt when generating entity id

* Avoid None state store attempt on entity remove
2019-07-21 09:59:02 -07:00
Ville SkyttäandPaulus Schoutsen fc5b1c7005 Mypy config improvements (#25340)
* Specify python version

So that it type checks against the lowest common denominator version,
not the runtime one.

* Disallow incomplete definitions
2019-07-20 14:35:59 -07:00
Ville SkyttäandPaulus Schoutsen 56e4a2aea6 Fix util.ruamel_yaml type errors (#25338) 2019-07-20 14:35:22 -07:00
Ville SkyttäandAndrew Sayre 258dc80fbd Remove some Python 2 compatibility code (#25341) 2019-07-20 08:04:18 -05:00
Ville SkyttäandGitHub 22d9a73e8e Doc lint fixes (#25339) 2019-07-20 15:30:36 +03:00
Ville SkyttäandPaulus Schoutsen 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äandPascal Vizeli 59f6fd7630 Upgrade flake8 to 3.7.8 (#25120)
http://flake8.pycqa.org/en/latest/release-notes/3.7.8.html
2019-07-13 09:32:08 +02:00
Ville SkyttäandDaniel Høyer Iversen b834671555 Test dependency updates (#25004)
* Upgrade pytest to 5.0.1

https://docs.pytest.org/en/latest/changelog.html#pytest-5-0-1-2019-07-04

* Upgrade asynctest to 0.13.0

* Upgrade requests_mock to 1.6.0
2019-07-07 12:30:31 +02:00
Ville SkyttäandMartin Hjelmare e8a5306c23 Upgrade mypy to 0.711, drop no longer needed workarounds (#24998)
https://mypy-lang.blogspot.com/2019/06/mypy-0711-released.html
2019-07-07 03:58:33 +02:00
Ville SkyttäandPaulus Schoutsen 71346760d0 Upgrade pytest to 4.6.3 (#24782)
* Upgrade pytest to 4.6.3

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-2-2019-06-03
https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-3-2019-06-11

* Make litejet switch test work with pytest 4.6.3

Essentially reverts the corresponing change that was made for pytest
4.2 compatibility.
2019-06-26 20:01:03 -07:00
Ville SkyttäandGitHub 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äandGitHub f1cbb2a0b3 braviatv, nmap_tracker: use getmac for getting MAC addresses (#24628)
* braviatv, nmap_tracker: use getmac for getting MAC addresses

Refs https://github.com/home-assistant/home-assistant/pull/24601

* Move getmac imports to top level
2019-06-20 23:35:02 +03:00
Ville SkyttäandPascal Vizeli bf9c2c74fa Upgrade pytest and -cov (#24258)
* Upgrade pytest to 4.5.0

https://docs.pytest.org/en/latest/changelog.html#pytest-4-5-0-2019-05-11
https://docs.pytest.org/en/latest/changelog.html#pytest-4-4-2-2019-05-08

* Upgrade pytest to 4.6.0

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-0-2019-05-31

* Upgrade pytest-cov to 2.7.1

https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst#271-2019-05-03
https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst#270-2019-05-03

* Upgrade pytest to 4.6.1

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-1-2019-06-02
2019-06-05 11:09:23 +02:00
Ville Skyttäandcdce8p cf89f45697 Fix homekit test assert no messages (#23856) 2019-05-15 13:13:56 +02:00
Ville SkyttäandPaulus Schoutsen c384adeef4 Upgrade defusedxml to 0.6.0 (#23651) 2019-05-08 08:04:36 -07:00
Ville SkyttäandJason Hu b9a72034f9 huawei_lte: handle icons for None sensor values gracefully (#23649) 2019-05-06 10:15:28 -07:00
Ville SkyttäandGitHub f434e24252 Upgrade mypy (#23586)
* Upgrade mypy to 0.701

* Enable strict equality checks

* Strict equality error fixes

* StateMachine.is_state docstring fix
2019-05-02 21:18:20 +03:00
Ville SkyttäandGitHub b79d71065c Upgrade pytest to 4.4.1 (#23584) 2019-05-02 21:17:36 +03:00
Ville SkyttäandGitHub 0a75a2c080 Clean up redundant same-package ..package imports (#23587) 2019-05-02 20:11:37 +03:00
Ville SkyttäandMartin Hjelmare f9205d0ccc Simplify Travis cache config (#23592) 2019-05-01 16:08:57 +02:00
Ville SkyttäandFabian Affolter 7058249c01 Uprade asynctest to 0.12.3 (#22824) 2019-04-10 11:17:02 +02:00
Ville SkyttäandFabian Affolter fa8a4de019 Upgrade pytest to 4.4.0 (#22822) 2019-04-10 11:16:52 +02:00
Ville SkyttäandDaniel Høyer Iversen b4f8d157d6 Upgrade pytest to 4.3.1 (#22088) 2019-03-16 08:13:45 +01:00
Ville SkyttäandPascal Vizeli dfd9f7ccf3 Upgrade huawei-lte-api to 1.1.5 (#21791) 2019-03-08 09:28:53 +01:00
Ville SkyttäandGitHub 2812483193 Upgrade pylint to 2.3.1 (#21789) 2019-03-08 09:13:35 +02:00
Ville SkyttäandPaulus Schoutsen beb86426e4 Upgrade flake8 to 3.7.7 (#21452) 2019-02-26 10:47:57 -08:00
Ville SkyttäandGitHub 619ea3ff98 Upgrade mypy to 0.670 (#20934) 2019-02-25 07:54:54 +02:00
Ville SkyttäandGitHub dd5fc0a1da Upgrade pytest to 4.3.0 (#21412) 2019-02-25 07:36:57 +02:00
Ville SkyttäandFabian Affolter 816364bfd9 Upgrade pytest to 4.2.1 (#21112)
* Upgrade pytest to 4.2.0

* Upgrade pytest to 4.2.1

* Make litejet switch test work with pytest 4.2
2019-02-17 09:55:33 +01:00
Ville SkyttäandGitHub 876e2a0a11 Upgrade mypy to 0.660 (#20873) 2019-02-09 08:32:14 +02:00
Ville SkyttäandPaulus Schoutsen d45f25ce2c Add more type hints to helpers (#20811)
* Add type hints to helpers.aiohttp_client

* Add type hints to helpers.area_registry
2019-02-07 13:34:14 -08:00
Ville SkyttäandMartin Hjelmare 3f997aefc1 Add huawei_lte notify component (#19544)
* Add huawei_lte notify component

* Use CONF_RECIPIENT instead of ATTR_TARGET in config
2019-02-01 18:42:45 +01:00
Ville SkyttäandFabian Affolter 58bb6f2e99 Add type hints to helpers.condition (#20266) 2019-01-21 00:03:12 +01:00
Ville SkyttäandGitHub eb610e6093 Upgrade pytest to 4.1.1 (#20088) 2019-01-14 10:05:24 +02:00
Ville SkyttäandDaniel Høyer Iversen 162e2b8385 Upgrade pytest to 4.1.0 (#20013) 2019-01-13 08:56:26 +01:00
Ville SkyttäandPaulus Schoutsen 574669bd20 Upgrade pytest-cov to 2.6.1 (#19988) 2019-01-11 16:24:59 -08:00
Ville SkyttäandPaulus Schoutsen 83c5dc67f7 Upgrade huawei-lte-api to 1.1.3 (#19987) 2019-01-11 16:24:31 -08:00
Ville SkyttäandFabian Affolter f925d9ca6b Use xml.etree through defusedxml (#19640) 2018-12-30 00:07:48 +01:00
Ville SkyttäandGitHub b83a405b14 Upgrade huawei-lte-api to 1.1.1 (#19615) 2018-12-28 11:10:34 +02:00
Ville SkyttäandFabian Affolter a6e091f60f Link to dicttoxml excessive INFO logging issue (#19575) 2018-12-26 14:16:08 +01:00
Ville SkyttäandGitHub c545d2e22e Upgrade pydocstyle to 3.0.0 (#19328) 2018-12-15 21:11:28 +02:00
Ville SkyttäandGitHub 06383a4383 Upgrade pytest to 4.0.2 (#19327) 2018-12-15 21:10:55 +02:00
Ville SkyttäandPaulus Schoutsen 1c147b5c5f huawei_lte: Fetch only required data (#17618)
When debug logging is enabled, still fetch everything in order to
provide indication of available/supported data to users, as instructed
in docs.
2018-12-14 14:51:13 +01:00
Ville SkyttäandGitHub 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ä ce998cdc87 Upgrade upcloud-api to 0.4.3 2018-12-09 19:19:13 +02:00
Ville SkyttäandPaulus Schoutsen 1be440a72b Upgrade pylint to 2.2.2 (#18750)
* Upgrade to 2.2.0

* simplifiable-if-expression fixes

* duplicate-string-formatting-argument fixes

* unused-import fixes

* Upgrade to 2.2.1

* Remove no longer needed disable

* Upgrade to 2.2.2
2018-12-06 11:54:44 +01:00
Ville SkyttäandPaulus Schoutsen 7248c9cb0e Remove some unused imports (#18732) 2018-11-27 09:35:35 +01:00
Ville SkyttäandPaulus Schoutsen b4e2f2a6ef Upgrade pytest and -timeout (#18722)
* Upgrade pytest to 4.0.1

* Upgrade pytest-timeout to 1.3.3
2018-11-26 22:43:14 +01:00
Ville SkyttäandFabian Affolter dfb8f60fe2 Upgrade pytest and pytest-cov (#18542)
* Upgrade pytest to 4.0.0

* Upgrade pytest-cov to 2.6.0
2018-11-18 09:33:01 +01:00
Ville SkyttäandPaulus Schoutsen 9411fca955 Add more type hints to helpers (#18350)
* Add type hints to helpers.entityfilter

* Add type hints to helpers.deprecation
2018-11-11 17:39:50 +01:00
Ville SkyttäandDaniel Høyer Iversen f236e14bd6 Upgrade pytest and pytest-sugar (#18338)
* Upgrade pytest to 3.10.0

* Upgrade pytest-sugar to 0.9.2
2018-11-10 21:08:32 +01:00
Ville SkyttäandPaulus Schoutsen 922f34f72d Add more type hints to helpers (#18196)
* Test typing for helpers.__init__ and temperature

* Add type hints to helpers.sun

* Add type hints to helpers.signal

* Add type hints to helpers.entity_values

* Add type hints to helpers.dispatcher
2018-11-04 22:46:42 +01:00
Ville SkyttäandJohann Kellerman a4c0c34028 Use ssdp udn uuid as Samsung TV unique id (#18022) 2018-11-02 11:50:07 +02:00
Ville SkyttäandDaniel Høyer Iversen 9c840f93f0 Use const.SUN_EVENT_* more (#18039) 2018-10-31 09:10:28 +01:00
Ville SkyttäandGitHub 4d9ef9e795 Import homeassistant domain instead of hardcoding it (#17985) 2018-10-30 17:38:09 +02:00
Ville SkyttäandDaniel Høyer Iversen 3e6de21302 Upgrade pytest to 3.9.3 (#17921) 2018-10-29 07:02:34 +01:00
Ville SkyttäandGitHub c9c707e368 Start type annotating/testing helpers (#17858)
* Add type hints to helpers.intent and location

* Test typing for helpers.icon, json, and typing

* Add type hints to helpers.state

* Add type hints to helpers.translation
2018-10-28 21:12:52 +02:00
Ville SkyttäandGitHub 43048962f2 Upgrade flake8 to 3.6.0 (#17770)
* Upgrade flake8 to 3.6.0

* flake8/pylint comment tweaks

* flake8 F841 fixes

* flake8 W605 fix

* Ignore pyflakes bug #373 false positives

https://github.com/PyCQA/pyflakes/issues/373

* pycodestyle bug #811 workaround

https://github.com/PyCQA/pycodestyle/issues/811
2018-10-25 23:15:20 +03:00
Ville SkyttäandDaniel Høyer Iversen 2734a30f37 Upgrade mypy to 0.641 (#17734) 2018-10-23 21:06:58 +02:00
Ville SkyttäandDaniel Høyer Iversen 65a8882426 Upgrade pytest to 3.9.2 (#17736) 2018-10-23 21:06:37 +02:00
Ville SkyttäandFabian Affolter cf3a97ff3c Upgrade pytest to 3.9.1 (#17598) 2018-10-18 21:31:52 +02:00
Ville SkyttäandFabian Affolter 15f4ed74ac Tweak sensors comments in default config (#17526)
Makes it more clear that there should be only one sensors section, and
that the weather prediction comment applies only to the yr platform.
2018-10-17 09:58:41 +02:00
Ville SkyttäandFabian Affolter b7b4224429 Huawei LTE sensor improvements (#17533)
* Sensor value formatting improvements

* Make default names more consistent with other sensors

* Improve unique id formatting
2018-10-17 09:00:15 +02:00
Ville SkyttäandPaulus Schoutsen 31981fde7e Make dicttoxml logging less verbose (#17446) 2018-10-15 11:25:38 +02:00
Ville SkyttäandPaulus Schoutsen 4fce051838 Add RSRQ, RSRP, and SINR to huawei_lte default sensors (#17425)
These are important LTE signal monitoring values.
2018-10-15 11:22:49 +02:00
Ville SkyttäandDaniel Høyer Iversen 9c178cf488 Add unique id to syncthru sensors (#17399) 2018-10-13 14:31:53 +02:00
Ville SkyttäandPaulus Schoutsen 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
Ville SkyttäandDaniel Høyer Iversen abd329d707 Upgrade pytest to 3.8.2 (#17125) 2018-10-04 09:03:31 +02:00
Ville SkyttäandPaulus Schoutsen d4cde2bfbf Upgrade huawei-lte-api to 1.0.16 (#16972) 2018-10-01 10:52:49 +02:00
Ville SkyttäandPaulus Schoutsen 06d959ed43 Upgrade pytest to 3.8.1 (#16980) 2018-09-30 10:20:10 +02:00
Ville SkyttäandPaulus Schoutsen 33d6c99f19 Add Python 3.7 classifier (#16645) 2018-09-24 11:11:24 +02:00
Ville SkyttäandPaulus Schoutsen 3160fa5de8 Make pylint report non-LF linefeeds per the style guidelines (#16601) 2018-09-19 15:51:57 +02:00
Ville SkyttäandPaulus Schoutsen d4b7057a3d Use posargs in tox lint env (#16646)
Allows linting specified files or dirs only.
2018-09-19 15:48:04 +02:00
Ville SkyttäandPaulus Schoutsen 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äandDaniel Høyer Iversen 7f462ba0ec Upgrade mypy to 0.630 (#16674) 2018-09-19 08:58:58 +02:00
Ville SkyttäandPaulus Schoutsen cc38981a38 Update developer doc links to developers.home-assistant.io (#16622) 2018-09-15 13:27:37 +02:00
Ville SkyttäandGitHub e054e4da1b Small huawei_lte improvements (#16626)
* Add bunch of RouterData tests

* Avoid raising AttributeError from RouterData.__getitem__

* Use new style string formatting

* Use {key: value} instead of dict(key=value)
2018-09-15 10:42:36 +03:00
Ville SkyttäandMartin Hjelmare 67b5b5bc85 Add myself to CODEOWNERS for upcloud (#16599) 2018-09-14 08:42:23 +02:00
Ville SkyttäandPaulus Schoutsen e59ba28fe6 Add Huawei LTE router platform, device tracker, and sensor (#16498)
* Add Huawei LTE router platform, device tracker, and sensor

* Add myself to CODEOWNERS for huawei_lte
2018-09-13 10:01:28 +02:00
Ville SkyttäandPaulus Schoutsen beed82ab12 Upgrade pytest to 3.8.0 and pytest-timeout to 1.3.2 (#16489) 2018-09-12 11:33:26 +02:00
Ville SkyttäandPaulus Schoutsen 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
Ville SkyttäandAnders Melchiorsen e3e3ed42ec Fix Netgear LTESensor docstring (#16501) 2018-09-08 23:22:41 +02:00
Ville SkyttäandPaulus Schoutsen dd9d53c83e Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 (#14557)
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0

* Pydocstyle D401 fixes
2018-08-24 10:28:43 +02:00
Ville SkyttäandFabian Affolter 89d856d147 Spelling fixes (#16150) 2018-08-23 22:56:18 +02:00
Ville SkyttäandPaulus Schoutsen ef07460792 Upgrade pytest to 3.7.2 (#16091) 2018-08-21 10:56:28 +02:00
Ville SkyttäandFabian Affolter dbd0763f83 Grammar and spelling fixes (#16065) 2018-08-19 22:29:08 +02:00
Ville SkyttäandPaulus Schoutsen 3800f00564 Disable assuming Optional type for values with None default (#16029)
https://www.python.org/dev/peps/pep-0484/#union-types
"Type checkers should move towards requiring the optional type to be
made explicit."
2018-08-17 20:22:49 +02:00
Ville SkyttäandPaulus Schoutsen 649f17fe47 Add type hints to homeassistant.auth (#15853)
* Always load users in auth store before use

* Use namedtuple instead of dict for user meta

* Ignore auth store tokens with invalid created_at

* Add type hints to homeassistant.auth
2018-08-16 22:25:41 +02:00