Commit Graph

12 Commits (27244e29c40bfa2093028199e7a33af4a7068053)

Author SHA1 Message Date
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