Anthony Sottile
5779f93ec6
keyword only arguments in some places
2020-01-12 13:39:53 -08:00
Anthony Sottile
34c3a1580a
unrelated cleanup
2020-01-12 13:39:53 -08:00
Anthony Sottile
49cf490697
Remove noop_context
2020-01-12 13:39:53 -08:00
Anthony Sottile
2a9893d0f0
mkdirp -> os.makedirs(..., exist_ok=True)
2020-01-12 13:39:53 -08:00
Anthony Sottile
67c2dcd90d
Remove pre_commit.five
2020-01-12 13:39:53 -08:00
Anthony Sottile
9000e9dd41
Some manual .format() -> f-strings
2020-01-12 13:39:53 -08:00
Anthony Sottile
aefbe71765
Clean up calls to .encode() / .decode()
2020-01-12 10:46:33 -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
ab19b94811
some manual py2 cleanups
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
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
f612aeb22b
Split out cmd_output_b
2019-10-06 15:16:47 -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
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
bdc58cc33f
Teach pre-commit try-repo to clone uncommitted changes
2019-01-01 15:01:36 -08:00
Anthony Sottile
9f60561d6f
Replace resources with importlib_resources
2018-10-14 14:37:35 -07:00
Anthony Sottile
ebe5132576
Replace pkg_resources.get_distribution with importlib-metadata
2018-10-14 12:24:59 -07:00
Anthony Sottile
e55f51fb14
Remove unused __popen DI
2018-05-02 11:25:16 -04:00
Anthony Sottile
29033f10ca
Move cwd() to tests-only
2018-02-24 16:44:59 -08:00
Rory Prendergast
355196f92e
backs out unnecessary blank line
2018-01-02 13:05:41 -08:00
Rory Prendergast
9eadfb92fd
reduces line length
2018-01-02 13:05:41 -08:00
Rory Prendergast
e3cf0975f9
Adds whitelist for GIT_* env vars containing only GIT_SSH
2018-01-02 13:05:41 -08:00
Anthony Sottile
18c9e061d8
Small cleanups
2017-09-30 15:53:44 -07:00
Anthony Sottile
0c70fa4229
Use asottile/add-trailing-comma
2017-07-12 18:30:51 -07:00
Anthony Sottile
c65a11ce3d
Replace five with six
2017-03-08 14:25:54 -08:00
Anthony Sottile
f000241dcb
Local repositories clone a blank repo
2017-02-15 15:36:53 -08:00
Anthony Sottile
ba75867c93
py27+ syntax improvements
2017-01-21 11:49:53 -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
b81c9802ae
Remove py26 format literals
...
Resolves #403
2016-09-15 08:41:58 -07:00
Anthony Sottile
57cc50e0ad
Remove tarfile_open (tarfile open in 2.7+)
2016-08-31 16:24:30 -07:00
Anthony Sottile
5a6b6e81e9
Don't crash when an executable is not found
2016-05-20 13:32:33 -07:00
Anthony Sottile
82369fd99f
Add utility for parsing shebangs and resolving PATH
2016-04-03 22:54:46 -07:00
Anthony Sottile
a932315a15
Implement 'negate' to simplify pcre
2016-03-25 11:21:50 -07:00
Anthony Sottile
b7d395410b
Implement a simplified xargs in python
2016-03-25 11:21:50 -07:00
Anthony Sottile
f3802e7944
Add a missing no-cover to increase coverage under py3
2016-03-21 15:21:22 -07:00
Anthony Sottile
2aaaddb5cc
Fail gracefully on undecodable install output.
2016-01-12 10:08:59 -08:00
Anthony Sottile
495fefd316
Fix #322 by only removing git environment variables while cloning
2015-12-22 19:10:08 -08:00
Anthony Sottile
a488424501
Use python3.5 in appveyor over py34
2015-12-22 14:40:30 -08:00
Anthony Sottile
2df1dc9023
Add python3.5, pypy3, and latest git to travis
2015-12-04 14:30:15 -08:00
Anthony Sottile
143ed94500
Tests pass on windows
2015-02-27 00:48:01 -08:00
Anthony Sottile
56e5c4eb2d
Use sqlite3 instead of symlinks for managing repositories
2015-02-22 17:42:40 -08:00
Buck Golemon
7bd1dd977d
improve output in error case
2015-01-06 16:25:46 -08: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
8fee06b53e
resource_filename instead of trying to remember the right invocation to pkg_resources.
2014-06-23 13:25:37 -07:00