Commit Graph

79 Commits

Author SHA1 Message Date
Anthony Sottile
0781dac78f avoid a UnicodeError on windows with non-charmap characters 2020-05-27 13:14:29 -07:00
Anthony Sottile
3d50b3736a Improve python healthy() and eliminate python_venv
- the `healthy()` check now requires virtualenv 20.x's metadata
- `python_venv` is obsolete now that `virtualenv` generates the same structure
  and `virtualenv` is more portable
2020-05-03 21:55:48 -07:00
Anthony Sottile
e492a5578c disable pip version check in python hooks 2020-04-29 12:11:34 -07:00
Anthony Sottile
522e82b7b7 Allow pip to be upgradable on windows 2020-04-17 07:41:11 -07:00
Anthony Sottile
7a49309035 mark a python environment as unhealthy if python goes missing 2020-03-12 09:40:56 -07:00
Anthony Sottile
fa8d022813 Remove unnecessary forward annotations 2020-02-07 08:32:39 -08:00
Anthony Sottile
95b8d71bd9 Move most of the actual hook script into pre-commit hook-impl 2020-01-21 16:41:22 -08:00
Anthony Sottile
755b8000f6 move Hook data type to a separate file 2020-01-15 14:20:51 -08:00
Anthony Sottile
df40e862f4 More miscellaneous cleanup 2020-01-13 11:47:34 -08:00
Anthony Sottile
9000e9dd41 Some manual .format() -> f-strings 2020-01-12 13:39:53 -08:00
Anthony Sottile
327ed924a3 Add types to pre-commit 2020-01-12 10:15:01 -08:00
Anthony Sottile
fa536a8693 mypy passes with check_untyped_defs 2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08:00
Anthony Sottile
bfcee8ec9f Fix python.healthy() check with stdlib module clashes 2019-10-22 13:23:57 -07:00
Anthony Sottile
7c3404ef1f show color in hook outputs when attached to a tty 2019-10-12 23:17:36 -07:00
Anthony Sottile
f612aeb22b Split out cmd_output_b 2019-10-06 15:16:47 -07:00
Ville Skyttä
562276098c Address more @asottile's review comments 2019-08-15 18:54:08 +03:00
Ville Skyttä
38da98d2d6 Address @asottile's review comments 2019-08-15 18:43:31 +03:00
Ville Skyttä
fa2e154b41 Stabilize python default version lookup
For example, for sys.executable:
    /usr/bin/python3 -> python3.7
...the default lookup may return either python3 or python3.7. Make the
order deterministic by iterating over tuple, not set, of candidates.
2019-08-15 10:06:31 +03:00
Anthony Sottile
9bdce088c8 Use sys.executable if it matches on posix as well 2019-06-17 07:54:38 -07:00
Anthony Sottile
d74ee6d743 Don't attempt to decode the healthy response 2019-05-07 09:38:17 -07:00
Anthony Sottile
9c6edab726 azure pipelines [skip travis] [skip appveyor] 2019-04-28 21:39:06 -07:00
Anthony Sottile
32d65236bf Use sys.executable if it matches the requested version 2019-01-10 06:48:49 -08:00
Anthony Sottile
d3b5a41830 Implement default_language_version 2019-01-05 13:15:23 -08:00
Anthony Sottile
b59d7197ff Use Hook api in languages 2018-12-31 13:16:48 -08:00
Anthony Sottile
6bac405d40 Minor cleanups 2018-11-01 18:05:36 -07:00
Chris Kuehl
ba5e27e4ec Implement concurrent execution of individual hooks 2018-10-24 16:16:10 -07:00
Anthony Sottile
b5af5a5b27 Add test for python_venv language 2018-05-12 11:37:13 -07:00
Anthony Sottile
e8954e2bf3 Simplify python_venv interface 2018-05-12 09:28:49 -07:00
Anthony Sottile
7d87da8acd Move PrefixedCommandRunner -> Prefix 2018-01-11 21:41:48 -08:00
Anthony Sottile
753979d720 Detect the python version based on the py launcher 2018-01-02 19:02:26 -08:00
Anthony Sottile
e70825ab31 Add ctypes to healthy check 2017-10-03 21:10:09 -07:00
Anthony Sottile
b907c02f05 Also check the ssl module for virtualenv health. 2017-09-14 10:09:25 -07:00
Anthony Sottile
cff98a634d Recover from invalid python virtualenvs 2017-07-20 10:57:09 -07:00
Anthony Sottile
0c70fa4229 Use asottile/add-trailing-comma 2017-07-12 18:30:51 -07:00
Evan Hubinger
4262487d12 Fix windows virtualenv issue 2017-07-09 13:40:51 -07:00
Anthony Sottile
d876661345 Use a more intelligent default language version 2017-07-08 21:11:48 -07:00
Anthony Sottile
a1e3a0a131 Use VIRTUALENV_NO_DOWNLOAD in pre-commit 2017-06-01 14:11:45 -07:00
Anthony Sottile
b6937f33e2 Fixups to make appveyor happy 2017-01-16 18:50:49 -08:00
Anthony Sottile
6055af8bc8 Make shlex behaviour of entry more consistent 2017-01-05 11:52:29 -08:00
Anthony Sottile
5ace43765b Allow virtualenv creation with strange setup.cfg. Resolves #425 2016-11-07 11:09:32 -08:00
Anthony Sottile
d5ebea31d7 Fix virtualenv-inside-venv on osx. Resolves #419 2016-10-23 16:43:34 -07:00
Anthony Sottile
b81c9802ae Remove py26 format literals
Resolves #403
2016-09-15 08:41:58 -07:00
Anthony Sottile
b7d395410b Implement a simplified xargs in python 2016-03-25 11:21:50 -07:00
Anthony Sottile
a5b56bd9e3 Factor out bash and activate files 2016-03-25 11:21:50 -07:00
Anthony Sottile
d58b945107 Fix pre-commit for latest virtualenv. Resolves #299. Resolves #334 2016-01-19 18:08:20 -08:00
Anthony Sottile
2aaaddb5cc Fail gracefully on undecodable install output. 2016-01-12 10:08:59 -08:00
Anthony Sottile
248930f6dc Fix appveyor and windows. Resolves #293 2015-11-23 22:28:57 -08:00
Anthony Sottile
66e8ed5ad5 Remove unneeded format chunk 2015-11-23 15:04:55 -08:00
Tobias Macey
0ee4c3efa7 Added unit tests for dependencies 2015-11-20 15:45:34 -05:00