mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use NotImplementedError for better exception messages
NotImplemented would cause a TypeError
This commit is contained in:
@@ -209,7 +209,7 @@ class ImageConverter(BaseImageConverter):
|
||||
def is_available(self):
|
||||
# type: () -> bool
|
||||
"""Confirms the converter is available or not."""
|
||||
raise NotImplemented
|
||||
raise NotImplementedError()
|
||||
|
||||
def guess_mimetypes(self, node):
|
||||
# type: (nodes.Node) -> List[unicode]
|
||||
@@ -248,7 +248,7 @@ class ImageConverter(BaseImageConverter):
|
||||
def convert(self, _from, _to):
|
||||
# type: (unicode, unicode) -> bool
|
||||
"""Converts the image to expected one."""
|
||||
raise NotImplemented
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
def setup(app):
|
||||
|
||||
@@ -21,7 +21,7 @@ except ImportError:
|
||||
class BaseStemmer(object):
|
||||
def stem(self, word):
|
||||
# type: (unicode) -> unicode
|
||||
raise NotImplemented
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class PyStemmer(BaseStemmer):
|
||||
|
||||
Reference in New Issue
Block a user