Skip to content

Commit fd27901

Browse files
authored
Remove dead code (#958)
1 parent c34b9f2 commit fd27901

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

deebot_client/models.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from dataclasses import dataclass
66
from enum import IntEnum, unique
7-
from pathlib import Path
87
from typing import TYPE_CHECKING, Required, TypedDict
98

109
from deebot_client.util.enum import StrEnumWithXml
@@ -91,26 +90,3 @@ class Credentials:
9190
token: str
9291
user_id: str
9392
expires_at: int = 0
94-
95-
96-
def _str_to_bool_or_cert(value: bool | str) -> bool | str:
97-
"""Convert string to bool or certificate."""
98-
if isinstance(value, bool):
99-
return value
100-
101-
if value is not None:
102-
value = value.lower()
103-
if value in ("y", "yes", "t", "true", "on", "1"):
104-
return True
105-
if value in ("n", "no", "f", "false", "off", "0"):
106-
return False
107-
path = Path(str(value))
108-
if path.exists():
109-
# User could provide a path to a CA Cert as well, which is useful for Bumper
110-
if path.is_file():
111-
return value
112-
msg = f"Certificate path provided is not a file: {value}"
113-
raise ValueError(msg)
114-
115-
msg = f'Cannot convert "{value}" to a bool or certificate path'
116-
raise ValueError(msg)

0 commit comments

Comments
 (0)