✅ Repair self-test

This commit is contained in:
HibiKier
2025-01-10 12:19:11 +08:00
committed by BalconyJH
parent 73d2ed444e
commit 0462703b13
5 changed files with 99 additions and 42 deletions
+16
View File
@@ -228,3 +228,19 @@ def is_valid_date(date_text: str, separator: str = "-") -> bool:
return True
except ValueError:
return False
def is_number(text: str) -> bool:
"""是否为数字
参数:
text: 文本
返回:
bool: 是否为数字
"""
try:
float(text)
return True
except ValueError:
return False