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 typing_extensions import Self
@@ -53,7 +53,7 @@ def __init__(
53
53
self ._network : Optional [Network ] = None
54
54
self ._network_aliases : Optional [list [str ]] = None
55
55
self ._kwargs = kwargs
56
- self ._files : list [Tuple [Path , Path ]] = []
56
+ self ._files : list [tuple [Path , Path ]] = []
57
57
58
58
def with_env (self , key : str , value : str ) -> Self :
59
59
self .env [key ] = value
@@ -91,7 +91,7 @@ def copy_file_from_container(self, container_file: str, destination_file: str) -
91
91
for chunk in tar_stream :
92
92
with tarfile .open (fileobj = io .BytesIO (chunk )) as tar :
93
93
for member in tar .getmembers ():
94
- with open (destination_file , 'wb' ) as f :
94
+ with open (destination_file , "wb" ) as f :
95
95
f .write (tar .extractfile (member ).read ())
96
96
97
97
return destination_file
@@ -100,7 +100,7 @@ def copy_file_from_container(self, container_file: str, destination_file: str) -
100
100
def _put_file_in_container (container , source_file : Path , destination_file : Path ):
101
101
data = io .BytesIO ()
102
102
103
- with tarfile .open (fileobj = data , mode = 'w' ) as tar :
103
+ with tarfile .open (fileobj = data , mode = "w" ) as tar :
104
104
tar .add (source_file , arcname = destination_file )
105
105
106
106
data .seek (0 )
0 commit comments