Skip to content

Commit 8687af9

Browse files
committed
fix: Format 2
1 parent aff9d33 commit 8687af9

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ check-format:
9898

9999
# Formats Python source code using autopep8 with aggressive settings
100100
format:
101-
autopep8 --aggressive --aggressive --in-place src/c2pa/*.py
101+
autopep8 --aggressive --aggressive --in-place src/c2pa/c2pa.py
102102

103103
# Downloads the required native artifacts for the specified version
104104
download-native-artifacts:

src/c2pa/lib.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ def _load_single_library(lib_name: str,
110110
The loaded library or None if loading failed
111111
"""
112112
if DEBUG_LIBRARY_LOADING: # pragma: no cover
113-
logger.info(f"Searching for library '{lib_name}' in paths: {
114-
[str(p) for p in search_paths]}")
113+
logger.info(f"Searching for library '{lib_name}' in paths: {[str(p) for p in search_paths]}")
115114
current_arch = _get_architecture()
116115
if DEBUG_LIBRARY_LOADING: # pragma: no cover
117116
logger.info(f"Current architecture: {current_arch}")
@@ -128,8 +127,7 @@ def _load_single_library(lib_name: str,
128127
except Exception as e:
129128
error_msg = str(e)
130129
if "incompatible architecture" in error_msg:
131-
logger.error(f"Architecture mismatch: Library at {
132-
lib_path} is not compatible with current architecture {current_arch}")
130+
logger.error(f"Architecture mismatch: Library at {lib_path} is not compatible with current architecture {current_arch}")
133131
logger.error(f"Error details: {error_msg}")
134132
else:
135133
logger.error(
@@ -227,8 +225,7 @@ def dynamically_load_library(
227225
if lib:
228226
return lib
229227
else:
230-
logger.error(f"Could not find library {
231-
env_lib_name} in any of the search paths")
228+
logger.error(f"Could not find library {env_lib_name} in any of the search paths")
232229
# Continue with normal loading if environment variable library
233230
# name fails
234231
except Exception as e:
@@ -244,19 +241,16 @@ def dynamically_load_library(
244241
if not lib:
245242
platform_id = get_platform_identifier()
246243
current_arch = _get_architecture()
247-
logger.error(f"Could not find {lib_name} in any of the search paths: {
248-
[str(p) for p in possible_paths]}")
244+
logger.error(f"Could not find {lib_name} in any of the search paths: {[str(p) for p in possible_paths]}")
249245
logger.error(
250246
f"Platform: {platform_id}, Architecture: {current_arch}")
251-
raise RuntimeError(f"Could not find {lib_name} in any of the search paths (Platform: {
252-
platform_id}, Architecture: {current_arch})")
247+
raise RuntimeError(f"Could not find {lib_name} in any of the search paths (Platform: {platform_id}, Architecture: {current_arch})")
253248
return lib
254249

255250
# Default path (no library name provided in the environment)
256251
c2pa_lib = _load_single_library(c2pa_lib_name, possible_paths)
257252
if not c2pa_lib:
258-
logger.error(f"Could not find {c2pa_lib_name} in any of the search paths: {
259-
[str(p) for p in possible_paths]}")
253+
logger.error(f"Could not find {c2pa_lib_name} in any of the search paths: {[str(p) for p in possible_paths]}")
260254
raise RuntimeError(
261255
f"Could not find {c2pa_lib_name} in any of the search paths")
262256

0 commit comments

Comments
 (0)