chore(api/core): apply ruff reformatting (#7624)
This commit is contained in:
parent
178730266d
commit
2cf1187b32
724 changed files with 21180 additions and 21123 deletions
|
|
@ -50,14 +50,16 @@ class SerplyApi:
|
|||
for job in jobs[:10]:
|
||||
try:
|
||||
string.append(
|
||||
"\n".join([
|
||||
f"Position: {job['position']}",
|
||||
f"Employer: {job['employer']}",
|
||||
f"Location: {job['location']}",
|
||||
f"Link: {job['link']}",
|
||||
f"""Highest: {", ".join(list(job["highlights"]))}""",
|
||||
"---",
|
||||
])
|
||||
"\n".join(
|
||||
[
|
||||
f"Position: {job['position']}",
|
||||
f"Employer: {job['employer']}",
|
||||
f"Location: {job['location']}",
|
||||
f"Link: {job['link']}",
|
||||
f"""Highest: {", ".join(list(job["highlights"]))}""",
|
||||
"---",
|
||||
]
|
||||
)
|
||||
)
|
||||
except KeyError:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -53,13 +53,15 @@ class SerplyApi:
|
|||
r = requests.get(entry["link"])
|
||||
final_link = r.history[-1].headers["Location"]
|
||||
string.append(
|
||||
"\n".join([
|
||||
f"Title: {entry['title']}",
|
||||
f"Link: {final_link}",
|
||||
f"Source: {entry['source']['title']}",
|
||||
f"Published: {entry['published']}",
|
||||
"---",
|
||||
])
|
||||
"\n".join(
|
||||
[
|
||||
f"Title: {entry['title']}",
|
||||
f"Link: {final_link}",
|
||||
f"Source: {entry['source']['title']}",
|
||||
f"Published: {entry['published']}",
|
||||
"---",
|
||||
]
|
||||
)
|
||||
)
|
||||
except KeyError:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -55,14 +55,16 @@ class SerplyApi:
|
|||
link = article["link"]
|
||||
authors = [author["name"] for author in article["author"]["authors"]]
|
||||
string.append(
|
||||
"\n".join([
|
||||
f"Title: {article['title']}",
|
||||
f"Link: {link}",
|
||||
f"Description: {article['description']}",
|
||||
f"Cite: {article['cite']}",
|
||||
f"Authors: {', '.join(authors)}",
|
||||
"---",
|
||||
])
|
||||
"\n".join(
|
||||
[
|
||||
f"Title: {article['title']}",
|
||||
f"Link: {link}",
|
||||
f"Description: {article['description']}",
|
||||
f"Cite: {article['cite']}",
|
||||
f"Authors: {', '.join(authors)}",
|
||||
"---",
|
||||
]
|
||||
)
|
||||
)
|
||||
except KeyError:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -49,12 +49,14 @@ class SerplyApi:
|
|||
for result in results:
|
||||
try:
|
||||
string.append(
|
||||
"\n".join([
|
||||
f"Title: {result['title']}",
|
||||
f"Link: {result['link']}",
|
||||
f"Description: {result['description'].strip()}",
|
||||
"---",
|
||||
])
|
||||
"\n".join(
|
||||
[
|
||||
f"Title: {result['title']}",
|
||||
f"Link: {result['link']}",
|
||||
f"Description: {result['description'].strip()}",
|
||||
"---",
|
||||
]
|
||||
)
|
||||
)
|
||||
except KeyError:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue