mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
upgrade hooks, pyupgrade pre-commit
This commit is contained in:
parent
764c765d29
commit
30c1e8289f
91 changed files with 176 additions and 437 deletions
|
|
@ -1,7 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import contextlib
|
||||
import io
|
||||
import os.path
|
||||
import shutil
|
||||
import tarfile
|
||||
|
|
@ -66,7 +63,7 @@ def _install_rbenv(prefix, version=C.DEFAULT): # pragma: windows no cover
|
|||
_extract_resource('ruby-build.tar.gz', plugins_dir)
|
||||
|
||||
activate_path = prefix.path(directory, 'bin', 'activate')
|
||||
with io.open(activate_path, 'w') as activate_file:
|
||||
with open(activate_path, 'w') as activate_file:
|
||||
# This is similar to how you would install rbenv to your home directory
|
||||
# However we do a couple things to make the executables exposed and
|
||||
# configure it to work in our directory.
|
||||
|
|
@ -86,7 +83,7 @@ def _install_rbenv(prefix, version=C.DEFAULT): # pragma: windows no cover
|
|||
|
||||
# If we aren't using the system ruby, add a version here
|
||||
if version != C.DEFAULT:
|
||||
activate_file.write('export RBENV_VERSION="{}"\n'.format(version))
|
||||
activate_file.write(f'export RBENV_VERSION="{version}"\n')
|
||||
|
||||
|
||||
def _install_ruby(prefix, version): # pragma: windows no cover
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue