refect: 코드 가독성 해결

This commit is contained in:
암냥 2025-07-02 19:10:58 +09:00
commit 3199a53a44
52 changed files with 389 additions and 3246 deletions

View file

@ -2,6 +2,7 @@ import requests
from lib.utils.config import BACKEND_URL
def notify_backend(target_url):
# Backend에 스캔 시작을 알림
try:

View file

@ -1,9 +1,10 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
# 미리 정해진 파일 경로
FILE_PATH = Path("data/log.txt")
def logger(msg: str) -> None:
try:
"""
@ -13,7 +14,7 @@ def logger(msg: str) -> None:
"""
# 상위 디렉터리 생성 (이미 있으면 무시)
FILE_PATH.parent.mkdir(parents=True, exist_ok=True)
# 현재 시각 구해서 포맷팅
now = datetime.now()
timestamp = now.strftime("%Y-%m-%d %H:%M:%S")
@ -26,4 +27,4 @@ def logger(msg: str) -> None:
with FILE_PATH.open(mode="a", encoding="utf-8") as f:
f.write(line)
except:
print(msg)
print(msg)