##// END OF EJS Templates
typing: simplify archive.gz writing and drop a few pytype suppressions...
Matt Harbison -
r52754:f81e0ce5 default
parent child Browse files
Show More
@@ -163,16 +163,7 class tarit:
163 mtime=mtime,
163 mtime=mtime,
164 )
164 )
165 self.fileobj = gzfileobj
165 self.fileobj = gzfileobj
166 return (
166 return tarfile.TarFile.taropen(name, "w", gzfileobj)
167 # taropen() wants Literal['a', 'r', 'w', 'x'] for the mode,
168 # but Literal[] is only available in 3.8+ without the
169 # typing_extensions backport.
170 # pytype: disable=wrong-arg-types
171 tarfile.TarFile.taropen( # pytype: disable=attribute-error
172 name, pycompat.sysstr(mode), gzfileobj
173 )
174 # pytype: enable=wrong-arg-types
175 )
176 else:
167 else:
177 try:
168 try:
178 return tarfile.open(
169 return tarfile.open(
General Comments 0
You need to be logged in to leave comments. Login now