From 991758348db7966b583c65fe195d22b442d18f31 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 11 May 2024 15:05:45 +0000 Subject: [PATCH] style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf This commit fixes the style issues introduced in a0333ed according to the output from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf. Details: None --- identity_verifier/identity_verifier/api.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/identity_verifier/identity_verifier/api.py b/identity_verifier/identity_verifier/api.py index 197bb574c..d0471659d 100644 --- a/identity_verifier/identity_verifier/api.py +++ b/identity_verifier/identity_verifier/api.py @@ -1,24 +1,28 @@ -from flask import Flask, request, jsonify +from flask import Flask, jsonify, request + from identity_verifier.biometrics import BiometricVerifier app = Flask(__name__) -@app.route('/verify', methods=['POST']) + +@app.route("/verify", methods=["POST"]) def verify(): # Get the image from the request - image = request.files['image'].read() + image = request.files["image"].read() # Verify the identity - verifier = BiometricVerifier('facial_recognition') + verifier = BiometricVerifier("facial_recognition") is_verified = verifier.verify(image) # Return the result - return jsonify({'is_verified': is_verified}) + return jsonify({"is_verified": is_verified}) -@app.route('/biometrics', methods=['GET']) + +@app.route("/biometrics", methods=["GET"]) def biometrics(): # Return a list of available biometric verification methods - return jsonify({'biometrics': ['facial_recognition']}) + return jsonify({"biometrics": ["facial_recognition"]}) + -if __name__ == '__main__': +if __name__ == "__main__": app.run(debug=True)