From fa09f132308be6eb3b9387428d740f9f29eb6cfc Mon Sep 17 00:00:00 2001 From: "13313720778@163.com" <13313720778@163.com> Date: Mon, 28 Oct 2024 21:21:42 +0800 Subject: [PATCH] Remove unnecessary print statements --- hinghwa-dict-backend/AudioCompare/Matcher.py | 1 - hinghwa-dict-backend/AudioCompare/main.py | 1 - hinghwa-dict-backend/quiz/quiz_record/view/quiz_record_all.py | 1 - hinghwa-dict-backend/user/view/manage.py | 3 --- hinghwa-dict-backend/utils/token.py | 1 - hinghwa-dict-backend/website/views.py | 2 -- 6 files changed, 9 deletions(-) diff --git a/hinghwa-dict-backend/AudioCompare/Matcher.py b/hinghwa-dict-backend/AudioCompare/Matcher.py index abf02907..a6229a5c 100644 --- a/hinghwa-dict-backend/AudioCompare/Matcher.py +++ b/hinghwa-dict-backend/AudioCompare/Matcher.py @@ -341,7 +341,6 @@ def match(self): else: with open(os.path.join(os.getcwd(), "submit结果存储.pkl"), "rb") as f: dir2_results = pickle.load(f) - print(len(dir2_results)) # Wait for pool to finish processing # pool.close() # pool.join() diff --git a/hinghwa-dict-backend/AudioCompare/main.py b/hinghwa-dict-backend/AudioCompare/main.py index 09ed6a92..98b35bc6 100644 --- a/hinghwa-dict-backend/AudioCompare/main.py +++ b/hinghwa-dict-backend/AudioCompare/main.py @@ -49,7 +49,6 @@ def audio_matcher(args: Arg): if filename not in a: a[filename] = [] a[filename].append((os.path.split(match.file2)[-1], match.score)) - # print(match) for file1 in a.keys(): a[file1].sort(key=lambda x: x[1], reverse=True) ans[file1] = a[file1][0][0] if a[file1][0][1] > 0 else None diff --git a/hinghwa-dict-backend/quiz/quiz_record/view/quiz_record_all.py b/hinghwa-dict-backend/quiz/quiz_record/view/quiz_record_all.py index b8c80c25..d71c25ec 100644 --- a/hinghwa-dict-backend/quiz/quiz_record/view/quiz_record_all.py +++ b/hinghwa-dict-backend/quiz/quiz_record/view/quiz_record_all.py @@ -49,7 +49,6 @@ def post(self, request): record.quiz = quiz record.contributor = contributor record.timestamp = timezone.now() - print("test") record.save() return JsonResponse(quiz_record(record), status=200) diff --git a/hinghwa-dict-backend/user/view/manage.py b/hinghwa-dict-backend/user/view/manage.py index 9502dbad..29bdc758 100644 --- a/hinghwa-dict-backend/user/view/manage.py +++ b/hinghwa-dict-backend/user/view/manage.py @@ -95,9 +95,6 @@ def put(self, request, id): user = get_user_by_id(id) body = demjson3.decode(request.body) info = body["user"] - print(info) - print(info["town"]) - print(info["county"]) user_info_form = UserInfoForm(info) if not user_info_form.is_valid: raise ValueError diff --git a/hinghwa-dict-backend/utils/token.py b/hinghwa-dict-backend/utils/token.py index 4ae86bc2..b3b1c1bf 100644 --- a/hinghwa-dict-backend/utils/token.py +++ b/hinghwa-dict-backend/utils/token.py @@ -101,7 +101,6 @@ def get_request_user(request: request) -> User: return AnonymousUser() # get user user = User.objects.get(id=info["id"]) - print(user.username) # exam username if user.username != info["username"]: return AnonymousUser() diff --git a/hinghwa-dict-backend/website/views.py b/hinghwa-dict-backend/website/views.py index 0b23bf2d..c7771a3a 100644 --- a/hinghwa-dict-backend/website/views.py +++ b/hinghwa-dict-backend/website/views.py @@ -795,7 +795,6 @@ def test(request): if ipa not in dic: dic[ipa] = [] dic[ipa].append(music[start:end]) - print(line[0]) sum = 0 for i in dic.values(): sum += len(i) @@ -805,7 +804,6 @@ def test(request): for i, music in zip(range(1, len(musics)), musics[1:]): path = os.path.join(result, ipa + f"-{i}.mp3") music.export(path, format="mp3") - print(idx) return JsonResponse({}, status=200) except Exception as e: return JsonResponse({"msg": str(e)}, status=500)