Python diff wrapper
This is a thin wrapper around
difflib.unified_diff that Does The Right Thing
for "No newline at eof". The args are also simplified compared to
moreorless.unified_diff( astr: str, bstr: str, filename: str, n: int = 3, ) -> str: ... # raises moreorless.patch.PatchException moreorless.patch.apply_single_file( contents: str, patch: str, allow_offsets: bool = True, ) -> str: ... # uses click to write to stdout with colors moreorless.click.echo_color_unified_diff( astr: str, bstr: str, filename: str, n: int = 3 ) -> None: ... # if you want to use unified_diff yourself first (e.g. in another process) moreorless.click.echo_color_precomputed_diff( diff: str, ) -> None: ...
morelorless is copyright Tim Hatch, and licensed under
the MIT license. I am providing code in this repository to you under an open
source license. This is my personal repository; the license you receive to
my code is from me and not from my employer. See the
LICENSE file for details.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size moreorless-0.4.0-py2.py3-none-any.whl (9.3 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size moreorless-0.4.0.tar.gz (10.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for moreorless-0.4.0-py2.py3-none-any.whl