From 317ed873f5ba1ff1d55048c8af0bdc4997a0a5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ianar=C3=A9=20S=C3=A9vi?= Date: Tue, 2 May 2023 23:50:15 +0200 Subject: [PATCH] update pylint and mypy --- .pylintrc | 7 ------- exifread/jpeg.py | 7 ++++--- exifread/utils.py | 4 ++-- setup.py | 4 ++-- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.pylintrc b/.pylintrc index 1d8227ad..74317a45 100644 --- a/.pylintrc +++ b/.pylintrc @@ -364,13 +364,6 @@ max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma, - dict-separator - # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no diff --git a/exifread/jpeg.py b/exifread/jpeg.py index 70c5ee3a..e792c6a9 100644 --- a/exifread/jpeg.py +++ b/exifread/jpeg.py @@ -96,9 +96,10 @@ def _get_base(base, data) -> int: increment = _increment_base(data, base) logger.debug(" Increment base by %s", increment) base += increment - logger.debug( - " There is useful EXIF-like data here (quality, comment, copyright), " "but we have no parser for it." - ) + logger.debug(( + " There is useful EXIF-like data here (quality, comment, copyright), " + "but we have no parser for it." + )) else: try: increment = _increment_base(data, base) diff --git a/exifread/utils.py b/exifread/utils.py index aea8b197..a07c9513 100644 --- a/exifread/utils.py +++ b/exifread/utils.py @@ -72,10 +72,10 @@ def get_gps_coords(tags: dict) -> tuple: lat_ref_val = tags[lat_ref_tag_name].values lat_coord_val = [c.decimal() for c in tags[lat_tag_name].values] - lng_coord = sum([c/60**i for i, c in enumerate(lng_coord_val)]) + lng_coord = sum(c / 60**i for (i, c) in enumerate(lng_coord_val)) lng_coord *= (-1) ** (lng_ref_val == 'W') - lat_coord = sum([c/60**i for i, c in enumerate(lat_coord_val)]) + lat_coord = sum(c / 60**i for (i, c) in enumerate(lat_coord_val)) lat_coord *= (-1) ** (lat_ref_val == 'S') return (lat_coord, lng_coord) diff --git a/setup.py b/setup.py index e1c3f499..5af24fd7 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,8 @@ readme_file = open("README.rst", "rt").read() dev_requirements = [ - "mypy==0.950", - "pylint==2.13.8", + "mypy==1.2.0", + "pylint==2.14.4", ] setup(