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

Bump black from 23.12.0 to 24.3.0 in /misc/requirements #786

Merged
merged 3 commits into from
Mar 19, 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 @@ -6,7 +6,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 24.3.0
hooks:
- id: black
args: [--force-exclude, .*syntax_error.*.py]
2 changes: 1 addition & 1 deletion misc/requirements/requirements_lint.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pylint==3.0.3
black==23.12.0
black==24.3.0
pydocstyle==6.3.0
6 changes: 2 additions & 4 deletions tests/unit/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,14 @@ def test(x: type_hint):


def test_slot_ignore_self():
def test(self, name: str):
...
def test(self, name: str): ...

slot_args = utils._slot_args(test, get_type_hints(test))
assert slot_args == [str]


def test_slot_add_returntype():
def test(self, name: str) -> str:
...
def test(self, name: str) -> str: ...

slot_kwargs = utils._slot_kwargs(get_type_hints(test))
assert slot_kwargs == {"result": str}
Expand Down
6 changes: 3 additions & 3 deletions vimiv/plugins/metadata_pyexiv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def copy_metadata(self, dest: str, reset_orientation: bool = True) -> bool:

if reset_orientation:
with contextlib.suppress(KeyError):
self._metadata[
"Exif.Image.Orientation"
] = metadata.ExifOrientation.Normal
self._metadata["Exif.Image.Orientation"] = (
metadata.ExifOrientation.Normal
)

try:
dest_image = pyexiv2.ImageMetadata(dest)
Expand Down
8 changes: 5 additions & 3 deletions vimiv/utils/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ def listfiles(directory: str, abspath: bool = False) -> List[str]:
abspath: Return the absolute path to the files, not relative to directory.
"""
return [
os.path.join(root, fname)
if abspath
else os.path.join(root.replace(directory, "").lstrip("/"), fname)
(
os.path.join(root, fname)
if abspath
else os.path.join(root.replace(directory, "").lstrip("/"), fname)
)
for root, _, files in os.walk(directory)
for fname in files
]
Loading