Skip to main content

Python diff wrapper

Project description

morelorless

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 difflib:

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

License

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moreorless-0.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

moreorless-0.2.0-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file moreorless-0.2.0.tar.gz.

File metadata

  • Download URL: moreorless-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for moreorless-0.2.0.tar.gz
Algorithm Hash digest
SHA256 85ba412f6d7acb690048c2f22bf82c3f97a38cf959a5ac4eac012b4156b96eb4
MD5 16d8c3a81dc25e0312a4ecef3b619dfd
BLAKE2b-256 cc7c85a576a8814426394edf93990f2cbdd5658a96056a06ae37072c119c61ed

See more details on using hashes here.

File details

Details for the file moreorless-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: moreorless-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for moreorless-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e7baa866618c5f5f0e77ff2b23068537fee0190ef779e26842a5d5cf4f44cfdb
MD5 4ba03a81e9db3deb821166c609a575db
BLAKE2b-256 596cba691d7a0eb00b5fac574168e885860a27760387b0f9a31c9139eef33d69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page