Skip to content

Commit 4f1dbb3

Browse files
committed
fix: remove unnecessary parens for pylint
Remove superfluous parentheses in range checks (C0325)
1 parent d5bfd41 commit 4f1dbb3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/inject_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
creator_public_key='0x2FBfE8F2bA00B255e60c220755040B597d09aFFa', # ethereum wallet address
1414
asset_hash='57ae67ebd994f462639381b22f47f4108dba008a4a3758f9e8cd9e8ff0d2d6cb', # sha256sum of numbers.png
1515
date_created=datetime.now(),
16-
latitude='123.123',
17-
longitude='45.45',
16+
latitude='25.033',
17+
longitude='121.565',
1818
date_captured=None,
1919
digital_source_type='trainedAlgorithmicMedia',
2020
generated_by='Stable Diffusion',

examples/numbers-c2pa.png

0 Bytes
Loading

src/numbers_c2pa/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def format_geolocation(value: Optional[str], is_latitude: bool) -> Optional[str]
4646
return None
4747
d = Decimal(value)
4848
# Validate coordinate ranges - return None for invalid values to skip EXIF field
49-
if is_latitude and not (-90 <= d <= 90):
49+
if is_latitude and not -90 <= d <= 90:
5050
return None
51-
if not is_latitude and not (-180 <= d <= 180):
51+
if not is_latitude and not -180 <= d <= 180:
5252
return None
5353
degrees = int(abs(d))
5454
minutes = (abs(d) - degrees) * 60

0 commit comments

Comments
 (0)