Skip to content

Commit 203d89c

Browse files
committed
badge
1 parent 8885ebb commit 203d89c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ecosystem/member.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ def from_dict(cls, dictionary: dict):
9898

9999
def to_dict(self) -> dict:
100100
base_dict = super().to_dict()
101-
base_dict["badge"] = (
102-
"[![Qiskit Ecosystem](https://img.shields.io/endpoint?style=flat&url=https"
103-
f"%3A%2F%2Fqiskit.github.io%2Fecosystem%2Fb%2F{self.short_uuid})]"
104-
"(https://qisk.it/e)"
105-
)
106101
if "ibm_maintained" in base_dict and base_dict["ibm_maintained"] is False:
107102
del base_dict["ibm_maintained"]
108103
return base_dict
@@ -130,6 +125,15 @@ def name_id(self):
130125
repo_dir = self.url.path.rstrip("/").split("/")[-1]
131126
return repo_dir.lower().replace(".", "_")
132127

128+
@property
129+
def badge(self):
130+
"""Markdown with the badge for README"""
131+
return (
132+
"[![Qiskit Ecosystem](https://img.shields.io/endpoint?"
133+
"style=flat&url=https%3A%2F%2Fqiskit.github.io%2Fecosystem%"
134+
f"2Fb%2F{self.short_uuid})](https://qisk.it/e)"
135+
)
136+
133137
def update_github(self):
134138
"""
135139
Updates all the GitHub information in the project.

0 commit comments

Comments
 (0)