Skip to content

Commit eba8a7d

Browse files
authored
Fix; f-string syntax error (#753)
1 parent 8ede1b5 commit eba8a7d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/.hooks/algolia.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ def on_page_content(html: str, page: Page, config: Config, files: Files) -> str:
4949

5050
# Cleanup code examples
5151
for extra in soup.find_all('div', attrs={'class': 'language-python highlight'}):
52-
extra.replace_with(BeautifulSoup(f'<pre>{extra.find('code').get_text()}</pre>', 'html.parser'))
52+
extra.replace_with(BeautifulSoup(f'<pre>{extra.find("code").get_text()}</pre>', 'html.parser'))
5353

5454
# Cleanup code examples, part 2
5555
for extra in soup.find_all('div', attrs={'class': 'language-python doc-signature highlight'}):
56-
extra.replace_with(BeautifulSoup(f'<pre>{extra.find('code').get_text()}</pre>', 'html.parser'))
56+
extra.replace_with(BeautifulSoup(f'<pre>{extra.find("code").get_text()}</pre>', 'html.parser'))
5757

5858
# The API reference generates HTML tables with line numbers, this strips the line numbers cell and goes back to a code block
5959
for extra in soup.find_all('table', attrs={'class': 'highlighttable'}):
60-
extra.replace_with(BeautifulSoup(f'<pre>{extra.find('code').get_text()}</pre>', 'html.parser'))
60+
extra.replace_with(BeautifulSoup(f'<pre>{extra.find("code").get_text()}</pre>', 'html.parser'))
6161

6262
# Find all h1 and h2 headings
6363
headings = soup.find_all(['h1', 'h2'])

docs/.hooks/build_llms_txt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def on_page_content(html: str, page: Page, config: MkDocsConfig, files: Files) -
2727

2828
# The API reference generates HTML tables with line numbers, this strips the line numbers cell and goes back to a code block
2929
for extra in soup.find_all('table', attrs={'class': 'highlighttable'}):
30-
extra.replace_with(BeautifulSoup(f'<pre>{extra.find('code').get_text()}</pre>', 'html.parser'))
30+
extra.replace_with(BeautifulSoup(f'<pre>{extra.find("code").get_text()}</pre>', 'html.parser'))
3131

3232
with open(os.path.join(config.site_dir, 'llms.txt'), 'a', encoding='utf-8') as f:
3333
f.write(MarkdownConverter().convert_soup(soup)) # type: ignore[reportUnknownMemberType]

0 commit comments

Comments
 (0)