1
0
Fork 0
forked from github/pelican

The ruff and ruff-format fixes

This commit is contained in:
boxydog 2024-05-30 09:05:36 -05:00
commit 6d8597addb
24 changed files with 48 additions and 79 deletions

View file

@ -5,11 +5,11 @@ from unittest.mock import patch
from pelican.settings import DEFAULT_CONFIG
from pelican.tests.support import (
TestCaseWithCLocale,
mute,
skipIfNoExecutable,
temporary_folder,
unittest,
TestCaseWithCLocale,
)
from pelican.tools.pelican_import import (
blogger2fields,
@ -19,12 +19,12 @@ from pelican.tools.pelican_import import (
download_attachments,
fields2pelican,
get_attachments,
tumblr2fields,
wp2fields,
medium_slug,
mediumpost2fields,
mediumposts2fields,
strip_medium_post_content,
medium_slug,
tumblr2fields,
wp2fields,
)
from pelican.utils import path_to_file_url, slugify
@ -41,7 +41,7 @@ WORDPRESS_DECODED_CONTENT_SAMPLE = os.path.join(
try:
from bs4 import BeautifulSoup
except ImportError:
BeautifulSoup = False # NOQA
BeautifulSoup = False
try:
import bs4.builder._lxml as LXML
@ -532,9 +532,7 @@ class TestWordpressXMLAttachements(TestCaseWithCLocale):
self.assertEqual(self.attachments[post], {expected_invalid})
else:
self.fail(
"all attachments should match to a " "filename or None, {}".format(
post
)
"all attachments should match to a " f"filename or None, {post}"
)
def test_download_attachments(self):