-
Couldn't load subscription status.
- Fork 126
Open
Labels
best practiceIssues that should be addressed for compliance with best practices, but that aren't technically bugsIssues that should be addressed for compliance with best practices, but that aren't technically bugs
Milestone
Description
Not all classes have __eq__ and __repr__. This was originally mentioned in #218 when I was writing tests for the Link class. It's okay to not have one or both of these in a class, but it's worth a quick discussion. __eq__ is mostly useful for testing. Can/should the __repr__ be something that can be pasted to create an instance of that thing? That seems tough with the structure of pystac.
find pystac -name \*.py | xargs grep '__eq__'
pystac/serialization/identify.py: def __eq__(self, other):
pystac/serialization/identify.py: return not self.__eq__(other)and
find pystac -name \*.py | wc -l
28
find pystac -name \*.py | xargs grep --files-without-match '__repr__' | wc -l
20
find pystac -name \*.py | xargs grep '__repr__'
pystac/collection.py: def __repr__(self):
pystac/extensions/pointcloud.py: def __repr__(self):
pystac/extensions/pointcloud.py: def __repr__(self):
pystac/extensions/label.py: def __repr__(self):
pystac/extensions/label.py: def __repr__(self):
pystac/extensions/eo.py: def __repr__(self):
pystac/extensions/eo.py: def __repr__(self):
pystac/link.py: def __repr__(self):
pystac/catalog.py: def __repr__(self):
pystac/item.py: def __repr__(self):
pystac/item.py: def __repr__(self):
pystac/serialization/identify.py: def __repr__(self):
pystac/serialization/identify.py: def __repr__(self):
Metadata
Metadata
Assignees
Labels
best practiceIssues that should be addressed for compliance with best practices, but that aren't technically bugsIssues that should be addressed for compliance with best practices, but that aren't technically bugs