Skip to content

Commit 7d609e2

Browse files
committed
fix test failure
1 parent f967ad8 commit 7d609e2

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/format.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# Read problem description from a file
2-
# the first line of the file is the question number.
3-
# Generate an output file with the description included in a block comment
1+
#
2+
# Utility to generate code template for a question.
3+
#
4+
# Read problem description from a file.
5+
# The first line of the file is the question number.
6+
# Generate an output file with the description included in a block comment.
47
# with each line less than 80.
5-
# and create question and test functions for it.
8+
# and create question function and test function.
69
#
7-
# read from question.txt, write to daily.py
810
def format_question(text: str, num: int, limit: int) -> str:
911
output = '\n"""\nquestion ' + str(num) + "\n"
1012
cur_line = ""
@@ -61,4 +63,9 @@ def read_and_format(input_file, output_file):
6163
output_obj.write(output)
6264

6365

64-
read_and_format("src/question.txt", "src/daily.py")
66+
def generate():
67+
read_and_format("src/question.txt", "src/daily.py")
68+
69+
70+
if __name__ == "__main__":
71+
generate()

0 commit comments

Comments
 (0)