4
4
from pathlib import Path
5
5
from platform import system
6
6
from socket import socket
7
- from typing import TYPE_CHECKING , Optional , Tuple
7
+ from typing import TYPE_CHECKING , Optional
8
8
9
9
import docker .errors
10
10
from docker import version
@@ -55,7 +55,7 @@ def __init__(
55
55
self ._network : Optional [Network ] = None
56
56
self ._network_aliases : Optional [list [str ]] = None
57
57
self ._kwargs = kwargs
58
- self ._files : list [Tuple [Path , Path ]] = []
58
+ self ._files : list [tuple [Path , Path ]] = []
59
59
60
60
def with_env (self , key : str , value : str ) -> Self :
61
61
self .env [key ] = value
@@ -93,7 +93,7 @@ def copy_file_from_container(self, container_file: str, destination_file: str) -
93
93
for chunk in tar_stream :
94
94
with tarfile .open (fileobj = io .BytesIO (chunk )) as tar :
95
95
for member in tar .getmembers ():
96
- with open (destination_file , 'wb' ) as f :
96
+ with open (destination_file , "wb" ) as f :
97
97
f .write (tar .extractfile (member ).read ())
98
98
99
99
return destination_file
@@ -102,7 +102,7 @@ def copy_file_from_container(self, container_file: str, destination_file: str) -
102
102
def _put_file_in_container (container , source_file : Path , destination_file : Path ):
103
103
data = io .BytesIO ()
104
104
105
- with tarfile .open (fileobj = data , mode = 'w' ) as tar :
105
+ with tarfile .open (fileobj = data , mode = "w" ) as tar :
106
106
tar .add (source_file , arcname = destination_file )
107
107
108
108
data .seek (0 )
0 commit comments