Skip to content

Commit

Permalink
format with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Waylon S. Walker committed Feb 14, 2025
1 parent 7642b63 commit a66220c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions markata/cli/didyoumean.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'''
"""
dummy didyoumean page for testing didyoumean suggestions
'''
"""
2 changes: 1 addition & 1 deletion markata/plugins/copy_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
```toml
[markata]
# Directory containing your static assets
assets_dir = "assets"
assets_dir = "assets"
# Directory where assets will be copied
output_dir = "markout"
Expand Down
4 changes: 2 additions & 2 deletions markata/plugins/flat_slug.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Installation
This plugin is built-in and enabled by default through the 'default' plugin.
This plugin is built-in and enabled by default through the 'default' plugin.
If you want to be explicit, you can add it to your list of plugins:
```toml
Expand Down Expand Up @@ -55,7 +55,7 @@
## Automatic Slug Based on Filename
By default the flat_slug plugin will use the `stem` of your filename (filename without
By default the flat_slug plugin will use the `stem` of your filename (filename without
extension) unless you explicitly set your slug in frontmatter.
Examples:
Expand Down
4 changes: 2 additions & 2 deletions markata/plugins/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
def render(markata: Markata) -> None:
should_prettify = markata.config.prettify_html
for article in markata.iter_articles("add ssg tag"):

def process_html(html_content):
soup = BeautifulSoup(html_content, features="lxml")
tag = soup.new_tag("meta")
Expand All @@ -74,6 +75,5 @@ def process_html(html_content):
article.html = process_html(article.html)
elif isinstance(article.html, dict):
article.html = {
slug: process_html(html)
for slug, html in article.html.items()
slug: process_html(html) for slug, html in article.html.items()
}
2 changes: 1 addition & 1 deletion markata/plugins/heading_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def post_render(markata: Markata) -> None:
article.html = link_headings(article)
elif isinstance(article.html, dict):
article.html = {
slug: link_headings(type('Post', (), {'html': html}))
slug: link_headings(type("Post", (), {"html": html}))
for slug, html in article.html.items()
}

Expand Down
4 changes: 2 additions & 2 deletions markata/plugins/load.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
The `markata.plugins.load` plugin is responsible for loading and parsing markdown files
with frontmatter into Post objects. It provides parallel loading capabilities and
with frontmatter into Post objects. It provides parallel loading capabilities and
handles both modern Pydantic-based and legacy frontmatter validation.
# Installation
This plugin is built-in and enabled by default through the 'default' plugin.
This plugin is built-in and enabled by default through the 'default' plugin.
If you want to be explicit, you can add it to your list of plugins:
```toml
Expand Down
2 changes: 1 addition & 1 deletion markata/plugins/publish_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"""

from pathlib import Path
from typing import Any, Dict, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union

import pydantic
from pydantic import ConfigDict, Field, field_validator
Expand Down
2 changes: 1 addition & 1 deletion markata/plugins/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def render(markata: "MarkataRss") -> None:
article_html = article.article_html
if isinstance(article_html, dict):
# Try to get the 'index' HTML content first
article_html = article_html.get('index')
article_html = article_html.get("index")
if article_html is None:
# Fall back to the first available HTML content
article_html = next(iter(article_html.values()))
Expand Down

0 comments on commit a66220c

Please sign in to comment.