Commit Graph

33 Commits

Author SHA1 Message Date
Anthony Sottile
017fa5c0b8 Merge pull request #2665 from pre-commit/move-parse-version
move parse_version to pre_commit.clientlib
2023-01-01 17:51:11 -05:00
Anthony Sottile
5425c754a0 move parse_version to pre_commit.clientlib 2023-01-01 17:17:00 -05:00
Anthony Sottile
0a0754e44a special rmtree is not needed for TemporaryDirectory in 3.8+ 2023-01-01 17:12:28 -05:00
marsha
42102a1bfd Remove expected_returncode from CalledProcessError 2022-10-30 15:31:45 -05:00
marsha
84b38f7b89 Change cmd_output_bs retcode arg to a boolean check 2022-10-30 14:49:42 -05: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
03617b2f98 Don't crash out on OSErrors in subprocess calls 2020-03-12 10:52:10 -07:00
Anthony Sottile
327ed924a3 Add types to pre-commit 2020-01-12 10:15:01 -08:00
Anthony Sottile
30c1e8289f upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08:00
Anthony Sottile
b90412742e A few cleanups for CalledProcessError to hopefully make it more readable 2019-12-23 17:46:48 -08:00
Anthony Sottile
7c3404ef1f show color in hook outputs when attached to a tty 2019-10-12 23:17:36 -07:00
Anthony Sottile
795506a486 Fix up some newlines in output 2019-09-24 10:22:44 -07:00
Anthony Sottile
da44d4267e Fix rmtree for readonly directories 2019-05-22 11:04:35 -07:00
Brett Randall
7d7c9c0fde Additional fixes prompted by double-quote-string-fixer.
Signed-off-by: Brett Randall <javabrett@gmail.com>
2019-03-18 10:24:46 +11:00
Anthony Sottile
b1389603e0 Speed up filename filtering.
Before there was a `getcwd` syscall for every filename which was filtered.

Instead this is now cached per-run.

- When all files are identified by filename only: ~45% improvement
- When no files are identified by filename only: ~55% improvement

This makes little difference to overall execution, the bigger win is
eliminating the `memoize_by_cwd` hack.  Just removing the memoization would
have *increased* the runtime by 300-500%.
2019-01-23 20:48:41 -08:00
Anthony Sottile
ebe5132576 Replace pkg_resources.get_distribution with importlib-metadata 2018-10-14 12:24:59 -07:00
Anthony Sottile
29033f10ca Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
Anthony Sottile
7d87da8acd Move PrefixedCommandRunner -> Prefix 2018-01-11 21:41:48 -08:00
Anthony Sottile
a157e1a63f xargs returns nonzero for negate + not found exe (fixes pcre + not found #447) 2016-12-04 15:07:35 -08:00
Anthony Sottile
a7169905dc Centralize logging initialization 2016-11-26 14:19:37 -08:00
Anthony Sottile
a932315a15 Implement 'negate' to simplify pcre 2016-03-25 11:21:50 -07:00
Anthony Sottile
fd109b7745 reorder-python-imports 2015-01-04 15:49:19 -08:00
Anthony Sottile
bbd2572b11 Remove plumbum 2014-10-02 06:59:37 -07:00
Anthony Sottile
32817f3958 Remove @entry 2014-08-13 11:02:40 -07:00
Anthony Sottile
a7133d6742 Add make archives scripts. 2014-06-23 13:04:47 -07:00
Anthony Sottile
2cfd2818b5 Add pcre type. 2014-06-16 21:11:00 -07:00
Anthony Sottile
85a76617c1 Refactor fixtures in tests. 2014-06-15 18:49:45 -07:00
Anthony Sottile
39c4ee6e96 Use asottile.cached_property. 2014-06-01 16:41:58 -07:00
Anthony Sottile
1746a97e24 Better project structure 2014-04-12 15:56:18 -07:00
Anthony Sottile
bcb00726a1 Clean up directories on failure. Closes #58. 2014-04-03 22:54:27 -07:00
Anthony Sottile
04b421978a Make entry points simpler 2014-03-22 18:11:30 -07:00
Anthony Sottile
da8c435e9c Improve performance on pre-commit -r pyflakes by 40% 2014-03-13 23:48:17 -07:00
Anthony Sottile
47bad120e4 Made env generation polymorphic 2014-03-13 20:48:00 -07:00