Skip to content

Commit

Permalink
fix: Enhancement of __repr__ method (nautobot#67)
Browse files Browse the repository at this point in the history
Update `__repr__()` of `Record` class in pynautobot/core/response.py
module. Get rid of ambiguous meaning of 'name=' in the string which
`__repr__()` returns.
  • Loading branch information
nautics889 authored and James Harr committed Jun 15, 2023
1 parent 3b5f08c commit 5160f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pynautobot/core/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def __str__(self):
return getattr(self, "display", None) or getattr(self, "name", None) or getattr(self, "label", None) or ""

def __repr__(self):
return "<{}.{} name='{}' at {}>".format(self.__class__.__module__, self.__class__.__name__, self, hex(id(self)))
return "<{}.{} ('{}') at {}>".format(self.__class__.__module__, self.__class__.__name__, self, hex(id(self)))

def __getstate__(self):
return self.__dict__
Expand Down

0 comments on commit 5160f2e

Please sign in to comment.