benchmarkstt.diff.formatter module¶
-
class
benchmarkstt.diff.formatter.ANSIDiffDialect(show_color_key=None)[source]¶ Bases:
benchmarkstt.diff.formatter.Dialect-
delete_format= '\x1b[31m%s\x1b[0m'¶
-
insert_format= '\x1b[32m%s\x1b[0m'¶
-
-
class
benchmarkstt.diff.formatter.Dialect[source]¶ Bases:
object-
delete_format= '%s'¶
-
equal_format= '%s'¶
-
insert_format= '%s'¶
-
preprocessor= None¶
-
replace_format= None¶
-
property
stream¶
-
-
class
benchmarkstt.diff.formatter.DiffFormatter(dialect=None, *args, **kwargs)[source]¶ Bases:
object-
diff_dialects= {'ansi': <class 'benchmarkstt.diff.formatter.ANSIDiffDialect'>, 'html': <class 'benchmarkstt.diff.formatter.HTMLDiffDialect'>, 'json': <class 'benchmarkstt.diff.formatter.JSONDiffDialect'>, 'list': <class 'benchmarkstt.diff.formatter.ListDialect'>, 'rst': <class 'benchmarkstt.diff.formatter.RestructuredTextDialect'>, 'text': <class 'benchmarkstt.diff.formatter.UTF8Dialect'>}¶
-
-
class
benchmarkstt.diff.formatter.HTMLDiffDialect[source]¶ Bases:
benchmarkstt.diff.formatter.Dialect-
delete_format= '<span class="delete">%s</span>'¶
-
insert_format= '<span class="insert">%s</span>'¶
-
-
class
benchmarkstt.diff.formatter.ListDialect[source]¶ Bases:
benchmarkstt.diff.formatter.Dialect-
delete_format(txt)[source]¶ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
-
equal_format(txt)[source]¶ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
-
insert_format(txt)[source]¶ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
-
-
class
benchmarkstt.diff.formatter.RestructuredTextDialect(show_color_key=None)[source]¶ Bases:
benchmarkstt.diff.formatter.ANSIDiffDialect-
delete_format= '\\ :diffdelete:`%s`\\ '¶
-
insert_format= '\\ :diffinsert:`%s`\\ '¶
-
-
class
benchmarkstt.diff.formatter.UTF8Dialect[source]¶ Bases:
benchmarkstt.diff.formatter.Dialect-
delete_format(txt)[source]¶ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
-
insert_format(txt)[source]¶ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
-