Skip to content

Commit

Permalink
fix: linting improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
vantage-ola committed Oct 11, 2024
1 parent cfc6090 commit 7bef16a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Flask Application
"""
from flask import Flask, jsonify, request
from models import Experience, Education, Skill, User
from models import Experience, Education, Skill
from utils import check_phone_number, correct_spelling, get_suggestion, load_data
app = Flask(__name__)

Expand All @@ -15,7 +15,7 @@ def hello_world():
Returns a JSON test message
"""
return jsonify({"message": "Hello, World!"})

@app.route("/resume/user", methods=["GET", "POST", "PUT"])
def user():
"""
Expand Down
4 changes: 1 addition & 3 deletions test_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_correct_spelling(text, expected):
response = app.test_client().post('/resume/spellcheck', json={'text': text})
assert response.status_code == 200
assert response.json['after'] == expected

@pytest.fixture
def setup_teardown():
'''
Expand Down Expand Up @@ -219,7 +219,6 @@ def test_load_data(setup_teardown):

if os.path.exists(invalid_json_file):
os.remove(invalid_json_file)

# testcases for ai suggested improved descriptions
@patch('app.get_suggestion')
def test_get_description_suggestion(mock_get_suggestion):
Expand Down Expand Up @@ -254,4 +253,3 @@ def test_get_description_suggestion_missing_fields():
})
assert response.status_code == 400
assert response.json['error'] == 'Description and type are required'

2 changes: 0 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
import google.generativeai as genai
from dotenv import load_dotenv


load_dotenv()


GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
genai.configure(api_key=GOOGLE_API_KEY)

Expand Down

0 comments on commit 7bef16a

Please sign in to comment.