mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
The ruff and ruff-format fixes
This commit is contained in:
parent
4f46fedd73
commit
6d8597addb
24 changed files with 48 additions and 79 deletions
|
|
@ -17,6 +17,9 @@ except ModuleNotFoundError:
|
|||
|
||||
from pelican.plugins import signals
|
||||
from pelican.settings import DEFAULT_CONFIG, Settings
|
||||
|
||||
# Import these so that they're available when you import from pelican.contents.
|
||||
from pelican.urlwrappers import Author, Category, Tag, URLWrapper # NOQA
|
||||
from pelican.utils import (
|
||||
deprecated_attribute,
|
||||
memoized,
|
||||
|
|
@ -28,9 +31,6 @@ from pelican.utils import (
|
|||
truncate_html_words,
|
||||
)
|
||||
|
||||
# Import these so that they're available when you import from pelican.contents.
|
||||
from pelican.urlwrappers import Author, Category, Tag, URLWrapper # NOQA
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
@ -370,13 +370,13 @@ class Content:
|
|||
|
||||
def _get_intrasite_link_regex(self) -> re.Pattern:
|
||||
intrasite_link_regex = self.settings["INTRASITE_LINK_REGEX"]
|
||||
regex = r"""
|
||||
regex = rf"""
|
||||
(?P<markup><[^\>]+ # match tag with all url-value attributes
|
||||
(?:href|src|poster|data|cite|formaction|action|content)\s*=\s*)
|
||||
|
||||
(?P<quote>["\']) # require value to be quoted
|
||||
(?P<path>{}(?P<value>.*?)) # the url value
|
||||
(?P=quote)""".format(intrasite_link_regex)
|
||||
(?P<path>{intrasite_link_regex}(?P<value>.*?)) # the url value
|
||||
(?P=quote)"""
|
||||
return re.compile(regex, re.X)
|
||||
|
||||
def _update_content(self, content: str, siteurl: str) -> str:
|
||||
|
|
@ -465,7 +465,6 @@ class Content:
|
|||
@summary.setter
|
||||
def summary(self, value: str):
|
||||
"""Dummy function"""
|
||||
pass
|
||||
|
||||
@property
|
||||
def status(self) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue