Skip to content

Commit

Permalink
update(code): apply git hooks with new minimal Python version
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Oct 23, 2024
1 parent 93a23d3 commit d8ceb47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions mkdocs_rss_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from email.utils import formatdate
from pathlib import Path
from re import compile as re_compile
from typing import List, Literal, Optional
from typing import Literal, Optional

# 3rd party
from jinja2 import Environment, FileSystemLoader, select_autoescape
Expand Down Expand Up @@ -79,7 +79,7 @@ def on_startup(
# flag used command to disable some actions if serve is used
self.cmd_is_serve = command == "serve"

self.pages_to_filter: List[PageInformation] = []
self.pages_to_filter: list[PageInformation] = []
# prepare output feeds
self.feed_created: dict = {}
self.feed_updated: dict = {}
Expand Down
16 changes: 10 additions & 6 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,16 +755,20 @@ def test_json_feed_validation(self):
self.assertIsNone(cli_result.exception)

# created items
with Path(tmpdirname).joinpath(OUTPUT_JSON_FEED_CREATED).open(
"r", encoding="UTF-8"
) as in_json:
with (
Path(tmpdirname)
.joinpath(OUTPUT_JSON_FEED_CREATED)
.open("r", encoding="UTF-8") as in_json
):
json_feed_created_data = json.load(in_json)
jsonfeed.Feed.parse(json_feed_created_data)

# updated items
with Path(tmpdirname).joinpath(OUTPUT_JSON_FEED_UPDATED).open(
"r", encoding="UTF-8"
) as in_json:
with (
Path(tmpdirname)
.joinpath(OUTPUT_JSON_FEED_UPDATED)
.open("r", encoding="UTF-8") as in_json
):
json_feed_updated_data = json.load(in_json)
jsonfeed.Feed.parse(json_feed_updated_data)

Expand Down

0 comments on commit d8ceb47

Please sign in to comment.