File tree 2 files changed +3
-10
lines changed
2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -471,10 +471,6 @@ def __init__(
471
471
self .data = data
472
472
473
473
def _fetch (self , start : int | None , stop : int | None ) -> bytes :
474
- if start is None :
475
- start = 0
476
- if stop is None :
477
- stop = len (self .data )
478
474
return self .data [start :stop ]
479
475
480
476
Original file line number Diff line number Diff line change @@ -295,10 +295,7 @@ def read_block(
295
295
length = end - start
296
296
297
297
f .seek (offset )
298
- if length is not None :
299
- b = f .read (length )
300
- else :
301
- b = f .read ()
298
+ b = f .read (length ) # type: ignore[arg-type]
302
299
return b
303
300
304
301
@@ -347,14 +344,14 @@ def stringify_path(filepath: str | os.PathLike[str] | pathlib.Path) -> str:
347
344
"""
348
345
if isinstance (filepath , str ):
349
346
return filepath
350
- elif hasattr (filepath , "__fspath__" ) or isinstance ( filepath , os . PathLike ) :
347
+ elif hasattr (filepath , "__fspath__" ):
351
348
return filepath .__fspath__ ()
352
349
elif isinstance (filepath , pathlib .Path ):
353
350
return str (filepath )
354
351
elif hasattr (filepath , "path" ):
355
352
return filepath .path
356
353
else :
357
- return filepath
354
+ return filepath # type: ignore[return-value]
358
355
359
356
360
357
def make_instance (
You can’t perform that action at this time.
0 commit comments