From 3a1a4a06e3650148b40a956e292e537a8efaa5a9 Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Fri, 17 May 2024 22:02:58 +0100 Subject: [PATCH] linting - recent PR comes with long line linting error - pipeline was using different pylint version, it gives error whereas my local does not --- .github/workflows/tests.yml | 2 +- deepface/modules/recognition.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f90eba9a4..c0550349b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install pylint==3.0.2 pip install black pip install . diff --git a/deepface/modules/recognition.py b/deepface/modules/recognition.py index 91a20d252..026ece1b0 100644 --- a/deepface/modules/recognition.py +++ b/deepface/modules/recognition.py @@ -68,8 +68,8 @@ def find( silent (boolean): Suppress or allow some log messages for a quieter analysis process. - refresh_database (boolean): Synchronizes the images representation (pkl) file with the - directory/db files, if set to false, it will ignore any file changes inside the db_path + refresh_database (boolean): Synchronizes the images representation (pkl) file with the + directory/db files, if set to false, it will ignore any file changes inside the db_path directory (default is True). @@ -157,8 +157,10 @@ def find( replaced_images = [] if not refresh_database: - logger.info(f"There could be changes in {db_path} not tracked. Set refresh_database to true to assure that any changes will be tracked.") - + logger.info( + f"Could be some changes in {db_path} not tracked." + "Set refresh_database to true to assure that any changes will be tracked." + ) # Enforce data consistency amongst on disk images and pickle file if refresh_database: @@ -180,7 +182,6 @@ def find( logger.debug(f"Even though {identity} represented before, it's replaced later.") replaced_images.append(identity) - if not silent and (len(new_images) > 0 or len(old_images) > 0 or len(replaced_images) > 0): logger.info( f"Found {len(new_images)} newly added image(s)"