GitXplorerGitXplorer
t

moreorless

public
6 stars
3 forks
3 issues

Commits

List of commits on branch main.
Unverified
9de97f4628ab8e6581483c30eb0cbd53f1e03d59

Fix lint issue only on 3.12

tthatch committed 9 months ago
Unverified
20c6601195ac8fa2906bfe817ecde26df3d1cf77

Bump minimum version

tthatch committed 9 months ago
Unverified
f4a3e2edaa91e79455dc8a3cf192d57071bc7d40

Update requirements, reformat

tthatch committed 9 months ago
Unverified
78a11a9341e0f5c0c536cd30de9a446ad40fd0df

Enable CI on main branch

tthatch committed 3 years ago
Unverified
8570715833a5e3fabfba8224a62b154e519b9103

Fix origin of misspelling in template generator

tthatch committed 3 years ago
Verified
737560de2ce3dd13806d8b57249f9a89bdda25b2

Merge pull request #5 from jwilk-forks/spelling

tthatch committed 3 years ago

README

The README file for this repository.

moreorless

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

# 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:
    ...

License

moreorless 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.