Skip to content

Commit f1100c0

Browse files
committed
include ipynb files as student files in python projects
1 parent 5654d99 commit f1100c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/python3/src/policy.rs

+2
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ impl StudentFilePolicy for Python3StudentFilePolicy {
3434
None => true,
3535
};
3636
let is_py_file = path.extension() == Some(OsStr::new("py"));
37+
let is_ipynb = path.extension() == Some(OsStr::new("ipynb"));
3738

3839
// all files in non-tmc and non-test subdirectories are considered student files
3940
let is_in_exercise_subdir = path.starts_with("test") || path.starts_with("tmc");
4041

4142
in_src && !is_cache_file
4243
|| is_in_project_root && is_py_file
4344
|| !is_in_exercise_subdir && !is_in_project_root && !is_cache_file
45+
|| is_ipynb && !is_cache_file
4446
}
4547
}
4648

0 commit comments

Comments
 (0)