1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
Commit Graph

34 Commits

Author SHA1 Message Date
Ville Skyttä
cf50ccb919
Run pre-commit gen_requirements_all on pre-commit config changes (#35588) 2020-05-14 07:24:27 +02:00
Ville Skyttä
e2b45915a6
Upgrade flake8 to 3.8.1, fix findings (#35578) 2020-05-13 17:14:30 -05:00
Franck Nijhof
7284f4e7ca
Upgrade pyupgrade to v2.3.0 (#35159) 2020-05-04 09:28:20 +02:00
Martin Hjelmare
aeb891649e
Add zwave mqtt (#34987) 2020-05-03 02:54:16 +02:00
Franck Nijhof
cc28150253
Upgrade pyupgrade to v2.2.1 (#34608) 2020-04-23 13:13:31 -07:00
Franck Nijhof
ced59e599f
Upgrade yamllint to 1.23.0 (#34337) 2020-04-17 13:12:25 +02:00
Paulus Schoutsen
1ffc3a00e7
Add translations check script (#34272) 2020-04-15 16:58:20 -07:00
Franck Nijhof
91d35c7c5c
Upgrade yamllint to 1.22.0 (#34198) 2020-04-14 12:33:06 +02:00
Franck Nijhof
34ecc803b3
Pre-commit changes to Prettier and executables check (#33749) 2020-04-06 19:53:39 +02:00
Franck Nijhof
d33cf28936
Add check executables have shebangs (in pre-commit and CI) (#33703)
* Add check executables have shebangs (in pre-commit and CI)

* Fix file permissions

* Adjust Azure Pipelines
2020-04-05 18:45:43 +02:00
Franck Nijhof
39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
Franck Nijhof
f38011560f
Add pyupgrade (in pre-commit and CI) (#33688)
* Add pyupgrade (in pre-commit and CI)

* Fix leftover results of pyupgrade

* Ensure we run for Python 3.7 on pyupgrade
2020-04-05 12:49:57 +02:00
Franck Nijhof
24840b54ac
Add yamllint (in pre-commit and CI) (#33676)
* Add yamllint (in pre-commit and CI)

* Fix linting for all YAML files

* Bump and add it to requirements

* Fix gen_requirements for pre-commit, remove 'v' from version
2020-04-05 10:33:45 +02:00
Eugenio Panadero
44425a184e
Fix pre-commit hooks env for gen_requirements_all & hassfest (#33187)
* Run-in-env script.gen_requirements_all and hassfest in pre-commit

* Apply suggestions from code review and change `language` to script

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2020-03-25 09:47:01 +02:00
Ville Skyttä
e97d21aec0
Run gen_requirements_all and hassfest in pre-commit (#32792)
Use generate mode for easy commit amendment with readily generated
files on failure.
2020-03-17 21:03:43 +01:00
Franck Nijhof
b2f2afaf0c
Prevent committing to dev/master/rc directly (#32029)
* Prevent committing to dev/master/rc directly

* Skip pre-commit on version bump
2020-02-20 09:34:30 -08:00
Ville Skyttä
dc5ca461a9
Run mypy through a pyenv/virtualenv enabler wrapper script (#30922) 2020-02-01 07:12:46 -08:00
Christian Clauss
df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Ville Skyttä
74cde3de6e Upgrade pydocstyle to 5.0.2 (#30648)
https://github.com/PyCQA/pydocstyle/blob/5.0.2/docs/release_notes.rst
2020-01-10 19:56:07 +01:00
Franck Nijhof
87ca61ddd7 Add check-json to CI and Pre-commit (#29912)
* Add check-json to CI and Pre-commit

* Add ignore pre-commit hooks to gen_requirements_all
2019-12-16 11:06:16 +01:00
Bas Nijholt
c58c10ab7c Add isort to CI and pre-commit (#29739)
* add isort to CI and pre-commit

* disable wrong-import-order in pylintrc

* ✏️ Tweak


Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2019-12-12 15:58:47 +01:00
Ville Skyttä
a12cf7211d Upgrade pydocstyle to 5.0.1 (#29830)
* Upgrade pydocstyle to 5.0.1

http://www.pydocstyle.org/en/5.0.1/release_notes.html

* Pydocstyle and other docstring fixes
2019-12-10 23:25:06 +01:00
Ville Skyttä
d4c80f160c Add bandit, use to catch known vulnerable XML parsing (#28341)
* Add bandit to pre-commit and CI, use to catch known vulnerable XML parsing

* Use defusedxml instead of direct xml.etree to parse XML

* Move config to tests/bandit.yaml
2019-11-18 09:10:15 +01:00
Ville Skyttä
804b6bbc0e Reduce test requirements duplication, sync flake8 and related (#28538)
* Generate pre-commit test dependencies instead of duplicating

* Upgrade/sync to flake8 3.7.9, flake8-docstrings 1.5.0, and pydocstyle 4.0.1

https://flake8.readthedocs.io/en/latest/release-notes/3.7.9.html
https://gitlab.com/pycqa/flake8-docstrings/blob/1.4.0/HISTORY.rst
https://gitlab.com/pycqa/flake8-docstrings/blob/1.5.0/HISTORY.rst
http://www.pydocstyle.org/en/4.0.1/release_notes.html

* Include requirements_test.txt from *_all.txt instead of copying
2019-11-04 21:21:52 -08:00
Ville Skyttä
a8dff2f2d0 pre-commit: ship default and full configs (#28463)
For now, the only difference between the two is mypy.
2019-11-02 12:21:09 -07:00
Franck Nijhof
04ab20846a Bump black to 19.10b0 (#28310) 2019-10-28 23:32:34 -07:00
Ville Skyttä
103ffacea7 Use pre-commit in CI and tox (#27743) 2019-10-18 12:20:26 -07:00
Ville Skyttä
3a608314c4 Mypy setup fixes (#27825)
* Install our core dependencies for mypy in azure

To match local setups and tox.

* Use "system" mypy in pre-commit instead of the "real" mypy hook

The results of mypy depend on what is installed. And the mypy hook
runs in a virtualenv of its own, meaning we'd need to install and
maintain another set of our dependencies there... no. Use the "system"
one and reuse the environment that is set up anyway already instead.

* Reintroduce needed ruamel.yaml type ignore

This ignore is required when ruamel.yaml is installed, and we want it
to be as it's part of the core dependency set.
2019-10-17 17:12:58 -07:00
Ville Skyttä
23db94c627 Run mypy in pre-commit without args to match CI (#27741) 2019-10-16 21:36:43 -07:00
Ville Skyttä
759ad08930 Typing misc fixes (#27543)
* Make async_get_conditions return type hint more specific

* Exclude script/scaffold/templates/ from pre-commit mypy
2019-10-14 13:03:37 -07: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
Ville Skyttä
4bcee4f7ce Run flake8 on pre-commit (#26028) 2019-08-17 21:15:55 -07:00
Ville Skyttä
d8e2518e0d Use canonical pre-commit black URL (#25948) 2019-08-14 09:13:24 -07:00
Paulus Schoutsen
da05dfe708 Add Black 2019-07-31 12:23:23 -07:00