Anthony Sottile
ae34a962d7
make in_env part of the language api
2023-01-16 15:36:29 -05:00
Anthony Sottile
05c8911363
simplify environment_dir
2023-01-01 21:11:56 -05:00
Anthony Sottile
d05b7888ab
move clean_path_on_failure out of each hook install
2023-01-01 20:04:58 -05:00
Anthony Sottile
07554e9525
add additional info to healthy-after-install check
2022-04-16 16:46:28 -04:00
Anthony Sottile
04de6a2e57
drop python 3.6 support
...
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Anthony Sottile
f8e21cb78b
add support for dart as a hook language
2021-08-29 08:57:56 -07:00
Anthony Sottile
7486dee082
fix for base executable with non-ascii characters on windows
2020-11-25 12:44:48 -08:00
Anthony Sottile
58a190fd69
don't pass through -p if using the default version
2020-09-23 17:44:18 -07:00
Anthony Sottile
4888644990
remove hardcoded python location
2020-09-15 12:04:25 -07:00
Anthony Sottile
b63b37ac36
fix cache of invalidated unhealthy environment version info
2020-08-23 10:17:24 -07:00
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