linting warnings

This commit is contained in:
Sefik Ilkin Serengil 2023-01-29 11:41:40 +00:00
parent aa7a8af9ff
commit 8f07aede24
5 changed files with 8 additions and 4 deletions

View File

@ -432,7 +432,9 @@ disable=raw-checker-failed,
duplicate-code, duplicate-code,
bare-except, bare-except,
cyclic-import, cyclic-import,
global-statement global-statement,
no-member,
no-name-in-module
# Enable the message, report, category or checker with the given id(s). You can # Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option # either give multiple identifier separated by comma (,) or put this option

View File

@ -3,6 +3,8 @@ import gdown
import tensorflow as tf import tensorflow as tf
from deepface.commons import functions from deepface.commons import functions
# pylint: disable=unsubscriptable-object
# -------------------------------- # --------------------------------
# dependency configuration # dependency configuration

View File

@ -5,7 +5,7 @@ from deepface.commons import functions
# --------------------------------------- # ---------------------------------------
tf_version = int(tf.__version__.split(".")[0]) tf_version = int(tf.__version__.split(".", maxsplit=1)[0])
if tf_version == 1: if tf_version == 1:
from keras.models import Model, Sequential from keras.models import Model, Sequential

View File

@ -74,7 +74,7 @@ def load_image(img):
img = loadBase64Img(img) img = loadBase64Img(img)
elif url_img is True: elif url_img is True:
img = np.array(Image.open(requests.get(img, stream=True).raw).convert("RGB")) img = np.array(Image.open(requests.get(img, stream=True, timeout=60).raw).convert("RGB"))
elif exact_image is not True: # image path passed as input elif exact_image is not True: # image path passed as input
if os.path.isfile(img) is not True: if os.path.isfile(img) is not True:

View File

@ -9,7 +9,7 @@ from deepface.commons import functions
# ------------------------------------- # -------------------------------------
# dependency configurations # dependency configurations
tf_version = int(tf.__version__.split(".")[0]) tf_version = int(tf.__version__.split(".", maxsplit=1)[0])
if tf_version == 1: if tf_version == 1:
from keras.models import Model, Sequential from keras.models import Model, Sequential