Skip to content

fix: revert raising of `NotImplemented`

In commit fa3b0fd1 the behavior of the methods dir_to_rotation and get_direction were (inadvertantly) changed. Previously None was returned, if the direction did not match. Now NotImplemented is raised.

The new behaviour has two problems:

  • NotImplementedError (the exception) should be used instead of NotImplemented (the value)
  • NotImplemented should be used, if a future implementation is planned. Here ValueError could be more appropriate.

Merge request reports