Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Ruff linter #117

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
rev: v0.3.2
hooks:
- id: ruff
- id: ruff-format
Expand Down
4 changes: 2 additions & 2 deletions pelican/plugins/photos/photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ def enqueue_image(img: Image) -> Image:
or g_image_cache[img.dst].spec != img.spec
):
raise InternalError(
"resize conflict for {}, {}-{} is not {}-{}".format(
"Resize conflict for {}, {}-{} is not {}-{}".format( # noqa: UP032
img.dst,
g_image_cache[img.dst].source_image.filename,
g_image_cache[img.dst].spec,
Expand Down Expand Up @@ -2169,7 +2169,7 @@ def replace_inline_images(content, inline_images):
html_img_attributes = profile.thumb_html_img_attributes
if html_img_attributes:
for prof_attr_name, prof_attr_value in html_img_attributes.items():
extra_attributes += ' {}="{}"'.format(
extra_attributes += ' {}="{}"'.format( # noqa: UP032
prof_attr_name, prof_attr_value.format(i=image)
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ markdown = [
[tool.pdm.dev-dependencies]
lint = [
"invoke>=2.2.0",
"ruff>=0.2",
"ruff>=0.3,<0.4",
]
test = [
"markdown>=3.4",
Expand Down
Loading