Skip to content

Commit d2298dc

Browse files
[Polish] Simplify __repr__ method in Request class (#5153)
Remove detailed string representation for Request class.
1 parent 6471dad commit d2298dc

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

fastdeploy/engine/request.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -310,19 +310,7 @@ def set(self, key, value):
310310

311311
def __repr__(self) -> str:
312312
"""Safe string representation that ignores private and None fields."""
313-
try:
314-
if not envs.FD_DEBUG:
315-
return f"Request(request_id={self.request_id})"
316-
else:
317-
attrs_snapshot = dict(vars(self))
318-
non_none_fields = [
319-
f"{attr}={value!r}"
320-
for attr, value in attrs_snapshot.items()
321-
if value is not None and not attr.startswith("_")
322-
]
323-
return f"Request({', '.join(non_none_fields)})"
324-
except Exception as e:
325-
return f"<{self.__class__.__name__} repr failed: {e}>"
313+
return ""
326314

327315

328316
@dataclass(slots=True)

0 commit comments

Comments
 (0)