Commit 6fbdae8e authored by Wei Shoulin's avatar Wei Shoulin
Browse files

rm valid filename

parent 62ba143a
from datetime import datetime
import re
def is_valid_filename(file_name: str) -> bool:
pattern = r'^.*\..*$'
if re.match(pattern, file_name):
return True
else:
raise False
def is_valid_datetime_format(date_str: str, format='%Y-%m-%d %H:%M:%S') -> bool:
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment