Skip to content

Commit d933ec8

Browse files
authored
fix: handle base64 serializing wrong (#643)
1 parent 85e19db commit d933ec8

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

roborock/data/containers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def _decamelize(s: str):
3232
s = re.sub(r"(?<=[a-z0-9])([A-Z])", r"_\1", s)
3333
s = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", s) # Split acronyms followed by normal camelCase
3434
s = re.sub(r"([a-zA-Z])([0-9]+)", r"\1_\2", s)
35-
return s.lower()
35+
s = s.lower()
36+
# Temporary fix to avoid breaking any serialization.
37+
s = s.replace("base_64", "base64")
38+
return s
3639

3740

3841
def _attr_repr(obj: Any) -> str:

0 commit comments

Comments
 (0)