This is pretty nitpicky, but you could actually make `current_row` and `add_grade_to_row` local to this function. It might make it more clear which state is in-flight, vs committed (and would, I guess, make it possible to nest this context manager, although I'm not sure why you'd want to do that).

If you don't do that, I would consider prefixing `current_row` and `add_grade_to_row` with `_`, since they really are intended to be private. The public interface is just `add_row`, `get_grade`, and `get_graded_component`.