@@ -2402,8 +2402,6 @@ def close(self) -> None:
24022402FileProtoT = TypeVar ("FileProtoT" )
24032403
24042404
2405-
2406-
24072405class _FileChecker (_HasExitStack , Generic [FileProtoT ]):
24082406 @property
24092407 @abc .abstractmethod
@@ -2445,13 +2443,13 @@ def __init__(
24452443 @functools .cached_property
24462444 def file (self ) -> FileProtoT :
24472445 return self ._ensure_file_obj ()
2448- # f=self._file,
2449- # FileProto=self.FileProto,
2450- # exit_stack=self.exit_stack,
2451- # new_file_mode="rb",
2452- # ExceptionClass=dbfFileException,
2453- #)
2454-
2446+ # f=self._file,
2447+ # FileProto=self.FileProto,
2448+ # exit_stack=self.exit_stack,
2449+ # new_file_mode="rb",
2450+ # ExceptionClass=dbfFileException,
2451+ # )
2452+
24552453 def _ensure_file_obj (
24562454 self ,
24572455 f : str | FileProtoT | None = None ,
@@ -2467,7 +2465,6 @@ def _ensure_file_obj(
24672465 FileProto = self .FileProto
24682466 new_file_mode = self .new_file_mode
24692467 ExceptionClass = self .ExceptionClass
2470-
24712468
24722469 if not f :
24732470 raise ExceptionClass (f"No file-like object received. Got: { f } " )
@@ -2486,6 +2483,7 @@ def _ensure_file_obj(
24862483 return f
24872484 raise ExceptionClass (f"Unsupported file-like object: { f } " )
24882485
2486+
24892487class DbfReader (_FileChecker [ReadSeekableBinStream ]):
24902488 """Reads a dbf file. You can instantiate a DbfReader without specifying a shapefile."""
24912489
0 commit comments