Skip to content

Commit

Permalink
fix: is_number()함수 기능 오류 해결
Browse files Browse the repository at this point in the history
int형인지 검사해야하지만, str형인지로 검사하는 오류
  • Loading branch information
AI-WonYJ committed Feb 10, 2025
1 parent 3f62a82 commit 861042a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/racingcar/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def is_number(Data):
숫자가 아니면 ValueError를 발생시킴.
"""
try:
str(Data) # Data가 int 형식인지 확인
int(Data) # Data가 int 형식인지 확인
except ValueError as e:
raise ValueError("숫자만 입력해주세요.") from e # 숫자가 아닌 값 입력시 예외 처리

Check warning on line 12 in src/racingcar/main.py

View check run for this annotation

Codecov / codecov/patch

src/racingcar/main.py#L11-L12

Added lines #L11 - L12 were not covered by tests

Expand Down

0 comments on commit 861042a

Please sign in to comment.