Skip to content

Commit

Permalink
pre commit linting
Browse files Browse the repository at this point in the history
  • Loading branch information
deepansh96 committed Apr 25, 2024
1 parent 7ce515d commit d4d2e22
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ terraform.tfstate
deployment/.env.staging
deployment/.env.production

app/scripts/dump
app/scripts/dump
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ repos:
rev: v0.58.4
hooks:
- id: cfn-python-lint
files: templates/.*\.(json|yml|yaml)$
files: templates/.*\.(json|yml|yaml)$
1 change: 0 additions & 1 deletion app/routers/quizzes.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ async def get_quiz(quiz_id: str):
)

for question_set_index, question_set in enumerate(quiz["question_sets"]):

updated_subset_without_details = []
options_count_per_set = options_count_across_sets[question_set_index][
"options_count_per_set"
Expand Down
1 change: 0 additions & 1 deletion app/routers/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ async def update_session(session_id: str, session_updates: UpdateSession):
else:
session_update_query["$set"].update({"events": [new_event_obj]})
else:

if (
new_event == EventType.dummy_event
and session["events"][-1]["event_type"] == EventType.dummy_event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
settings = Settings()

if __name__ == "__main__":

if "MONGO_AUTH_CREDENTIALS" not in os.environ:
from dotenv import load_dotenv

Expand Down
1 change: 0 additions & 1 deletion app/scripts/find_and_replace_some_text_in_all_quizzes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os

if __name__ == "__main__":

if "MONGO_AUTH_CREDENTIALS" not in os.environ:
from dotenv import load_dotenv

Expand Down
3 changes: 0 additions & 3 deletions app/scripts/remove_extra_dummy_events_in_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# test session["_id"] in prod: 633646b0639829dad5a896b4

if __name__ == "__main__":

if "MONGO_AUTH_CREDENTIALS" not in os.environ:
from dotenv import load_dotenv

Expand All @@ -16,7 +15,6 @@
for session in session_collection.find(
{"events": {"$exists": True}, "$expr": {"$gt": [{"$size": "$events"}, 1000]}}
):

print(session["_id"])

if session["events"] is None:
Expand All @@ -29,7 +27,6 @@

# Loop through all events in the session
for event in session["events"]:

# Check if the event is a dummy event
if event["event_type"] == "dummy-event":
# Check if we've already seen a dummy event
Expand Down
1 change: 0 additions & 1 deletion app/scripts/tag_all_questions_with_question_set_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os

if __name__ == "__main__":

if "MONGO_AUTH_CREDENTIALS" not in os.environ:
from dotenv import load_dotenv

Expand Down
1 change: 0 additions & 1 deletion app/scripts/update_specific_user_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import json

if __name__ == "__main__":

if "MONGO_AUTH_CREDENTIALS" not in os.environ:
from dotenv import load_dotenv

Expand Down
2 changes: 1 addition & 1 deletion app/tests/test_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ def test_get_questions_for_multiple_question_sets(self):

assert response.status_code == 200
response = response.json()
assert type(response) == list
assert isinstance(response, list)
assert len(response) == settings.subset_size

0 comments on commit d4d2e22

Please sign in to comment.