def do_cheats():
    """Show a cheatsheet of useful things during releasing."""
    facts = get_release_facts()
    pprint.pprint(facts.__dict__)
    print()
    print(f"Coverage version is {facts.ver}")

    repo = "nedbat/coveragepy"
    github = f"https://github.com/{repo}"
    egg = "egg=coverage==0.0"  # to force a re-install
    print(
        f"https://coverage.readthedocs.io/en/{facts.ver}/changes.html#changes-{facts.anchor}",
    )

    print(
        "\n## For GitHub commenting:\n"
        + "This is now released as part of "
        + f"[coverage {facts.ver}](https://pypi.org/project/coverage/{facts.ver}).",
    )

    print("\n## To install this code:")
    if facts.branch == "master":
        print(f"python3 -m pip install git+{github}#{egg}")
    else:
        print(f"python3 -m pip install git+{github}@{facts.branch}#{egg}")
    print(f"python3 -m pip install git+{github}@{facts.sha[:20]}#{egg}")

    print("\n## To read this code on GitHub:")
    print(f"https://github.com/nedbat/coveragepy/commit/{facts.sha}")
    print(f"https://github.com/nedbat/coveragepy/commits/{facts.sha}")
    print(f"https://github.com/nedbat/coveragepy/tree/{facts.branch}")

    print(
        "\n## For other collaborators to get this code:\n"
        + f"git clone {github}\n"
        + f"cd {repo.partition('/')[-1]}\n"
        + f"git checkout {facts.sha}",
    )
Show a cheatsheet of useful things during releasing.
igor.py