We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3186644 commit 67cfbfeCopy full SHA for 67cfbfe
pystac/provider.py
@@ -1,6 +1,7 @@
1
from enum import Enum
2
from typing import Any, Dict, List, Optional
3
4
+
5
class ProviderRole(str, Enum):
6
"""Enumerates the allows values of the Provider "role" field."""
7
@@ -63,6 +64,11 @@ def __init__(
63
64
self.url = url
65
self.extra_fields = extra_fields or {}
66
67
+ def __eq__(self, o: object) -> bool:
68
+ if not isinstance(o, Provider):
69
+ return NotImplemented
70
+ return self.to_dict() == o.to_dict()
71
72
def to_dict(self) -> Dict[str, Any]:
73
"""Generate a dictionary representing the JSON of this Provider.
74
@@ -100,4 +106,4 @@ def from_dict(d: Dict[str, Any]) -> "Provider":
100
106
for k, v in d.items()
101
107
if k not in {"name", "description", "roles", "url"}
102
108
},
103
- )
109
+ )
0 commit comments