File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -153,13 +153,10 @@ def new_problem() -> None:
153153 skeldir , preserve_symlinks = get_skel_dir (target_dir )
154154 log (f"Copying { skeldir } to { target_dir / dirname } ." )
155155
156- skel_yaml = read_yaml (skeldir / "problem.yaml" )
157- if (
158- "problem_format_version" not in skel_yaml
159- or skel_yaml ["problem_format_version" ] not in config .SPEC_VERSION
160- ):
156+ skel_yaml = (skeldir / "problem.yaml" ).read_text ()
157+ if not any (version in skel_yaml for version in config .SPEC_VERSION ):
161158 fatal (
162- f"new_problem only supports `skel` directories where `problem.yaml` has ` version: { config .SPEC_VERSION [0 ]} ."
159+ f"new_problem only supports `skel` directories where `problem.yaml` has version: { config .SPEC_VERSION [0 ]} ."
163160 )
164161
165162 problems_yaml = target_dir / "problems.yaml"
You can’t perform that action at this time.
0 commit comments