Skip to content

Commit

Permalink
Ignore Corrupt EXIF data warnings (#137)
Browse files Browse the repository at this point in the history
* Ignore `UserWarning: Corrupt EXIF data` warnings
* Update deps & pre-commit-config
  • Loading branch information
bpepple authored Aug 19, 2024
1 parent 5749a06 commit 3777c1f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ruff.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.1
rev: v0.6.1
hooks:
- id: ruff
- id: ruff-format
5 changes: 5 additions & 0 deletions metrontagger/duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

import io
import warnings
from dataclasses import dataclass
from logging import getLogger
from pathlib import Path
Expand All @@ -19,6 +20,10 @@

LOGGER = getLogger(__name__)

warnings.filterwarnings(
"ignore", category=UserWarning
) # Ignore 'UserWarning: Corrupt EXIF data' warnings


@dataclass
class DuplicateIssue:
Expand Down
6 changes: 6 additions & 0 deletions metrontagger/talker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import io
import warnings
from datetime import datetime
from enum import Enum, auto, unique
from logging import getLogger
Expand Down Expand Up @@ -29,6 +30,11 @@
from metrontagger.utils import create_query_params

LOGGER = getLogger(__name__)

warnings.filterwarnings(
"ignore", category=UserWarning
) # Ignore 'UserWarning: Corrupt EXIF data' warnings

HAMMING_DISTANCE = 10


Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3777c1f

Please sign in to comment.