MCPcopy
hub / github.com/hacs/integration / RemovedRepository

Class RemovedRepository

custom_components/hacs/base.py:77–107  ·  view source on GitHub ↗

Removed repository.

Source from the content-addressed store, hash-verified

75
76@dataclass
77class RemovedRepository:
78 """Removed repository."""
79
80 repository: str | None = None
81 reason: str | None = None
82 link: str | None = None
83 removal_type: str = None # archived, not_compliant, critical, dev, broken
84 acknowledged: bool = False
85
86 def update_data(self, data: dict):
87 """Update data of the repository."""
88 for key in data:
89 if data[key] is None:
90 continue
91 if key in (
92 "reason",
93 "link",
94 "removal_type",
95 "acknowledged",
96 ):
97 self.__setattr__(key, data[key])
98
99 def to_json(self):
100 """Return a JSON representation of the data."""
101 return {
102 "repository": self.repository,
103 "reason": self.reason,
104 "link": self.link,
105 "removal_type": self.removal_type,
106 "acknowledged": self.acknowledged,
107 }
108
109
110@dataclass

Callers 2

test_removed_repositoryFunction · 0.90
removed_repositoryMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_removed_repositoryFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…