refactor: excel parse

This commit is contained in:
Blizzard
2026-04-16 10:01:11 +08:00
parent 680ecc320f
commit f62f95ec02
7941 changed files with 2899112 additions and 0 deletions
@@ -0,0 +1,36 @@
import typing
from . import types
class BaseLockException(Exception): # noqa: N818
# Error codes:
LOCK_FAILED: typing.Final = 1
strerror: typing.Optional[str] = None # ensure attribute always exists
def __init__(
self,
*args: typing.Any,
fh: typing.Union[types.IO, None, int, types.HasFileno] = None,
**kwargs: typing.Any,
) -> None:
self.fh = fh
self.strerror = (
str(args[1])
if len(args) > 1 and isinstance(args[1], str)
else None
)
Exception.__init__(self, *args)
class LockException(BaseLockException):
pass
class AlreadyLocked(LockException):
pass
class FileToLarge(LockException):
pass