44import io
55import os .path
66import shutil
7+ import tarfile
78
89from pre_commit .envcontext import envcontext
910from pre_commit .envcontext import Var
1011from pre_commit .languages import helpers
1112from pre_commit .util import CalledProcessError
1213from pre_commit .util import clean_path_on_failure
1314from pre_commit .util import resource_filename
14- from pre_commit .util import tarfile_open
1515from pre_commit .xargs import xargs
1616
1717
@@ -46,7 +46,7 @@ def in_env(repo_cmd_runner, language_version):
4646def _install_rbenv (repo_cmd_runner , version = 'default' ):
4747 directory = helpers .environment_dir (ENVIRONMENT_DIR , version )
4848
49- with tarfile_open (resource_filename ('rbenv.tar.gz' )) as tf :
49+ with tarfile . open (resource_filename ('rbenv.tar.gz' )) as tf :
5050 tf .extractall (repo_cmd_runner .path ('.' ))
5151 shutil .move (
5252 repo_cmd_runner .path ('rbenv' ), repo_cmd_runner .path (directory ),
@@ -55,11 +55,11 @@ def _install_rbenv(repo_cmd_runner, version='default'):
5555 # Only install ruby-build if the version is specified
5656 if version != 'default' :
5757 # ruby-download
58- with tarfile_open (resource_filename ('ruby-download.tar.gz' )) as tf :
58+ with tarfile . open (resource_filename ('ruby-download.tar.gz' )) as tf :
5959 tf .extractall (repo_cmd_runner .path (directory , 'plugins' ))
6060
6161 # ruby-build
62- with tarfile_open (resource_filename ('ruby-build.tar.gz' )) as tf :
62+ with tarfile . open (resource_filename ('ruby-build.tar.gz' )) as tf :
6363 tf .extractall (repo_cmd_runner .path (directory , 'plugins' ))
6464
6565 activate_path = repo_cmd_runner .path (directory , 'bin' , 'activate' )
0 commit comments