Skip to content

Commit 480571b

Browse files
committed
added config files
1 parent cbdd471 commit 480571b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

project/.cs50.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
submit50:
2+
files: &submit50_files
3+
- !require README.md
4+
style: false
5+
6+
check50:
7+
files: *submit50_files
8+
9+

project/__init__.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import re
2+
import check50
3+
4+
@check50.check()
5+
def exists():
6+
"""README.md exists"""
7+
check50.exists("README.md")
8+
9+
@check50.check(exists)
10+
def final():
11+
"""final project details"""
12+
text = open("README.md").read().lower()
13+
if len(text) < 2500:
14+
raise check50.Failure(f"Description is not long enough.")
15+
16+
urls = re.findall('https?:\/\/[\w/\-?=%.]+\.[\w/\-?=%.]+', text)
17+
if not urls:
18+
raise check50.Failure(f"Video URL is missing.")
19+

0 commit comments

Comments
 (0)