semvec/pypi-packages huggingface dataset:
pyrust-task-id 0.1.5
Tool to provide task id, retrieved from branch name, right into commit message.
Requires Python: >=3.8
Keywords: rust, python, ticket, task, branch, commit, auto, pre-commit, retrieve, pull, parse, jira, hook

# PyRust Task ID
![PyRust Task ID](https://img.shields.io/pypi/v/pyrust-task-id?label=pyrust-task-id)
![MIT](https://img.shields.io/badge/license-MIT-blue)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/vanya909/pyrust-task-id/.github%2Fworkflows%2FCI.yml)


A written in Rust tool for Python programs that automatically pull task id from branch name to commit message.

## Example
Let's imagine you have branch `project_name/TASK-111-implement-feature` and you need
to provide the task `TASK-111` into commit message.<br>Then you can just use this tool.

First, just add hook into `.pre-commit-config.yaml`:
```yaml
-   repo: https://github.com/vanya909/pyrust-task-id-pre-commit
    rev: 0.1.5
    hooks:
    -   id: pyrust-task-id
        stages: [commit-msg]
        args:
        -   "project_name/(?P<task_template>TASK-[0-9]{3})-.*"
        -   "{subject}\\n\\n{body}\\n\\nTask ID: {task_id}"
```

Then run
```bash
pre-commit install --hook-type "commit-msg"
```

Then commit
```bash
git commit -m"My cool feature" -m"Can't wait to see this feature in prod."
```

And then you'll see following commit message:
```
My cool feature

Can't wait to see this feature in prod.

Task ID: TASK-111
```

This project uses [standalone repo](https://github.com/vanya909/pyrust-task-id-pre-commit) for pre-commit hook because it requires pre-build python wheels from PyPI
shhhinterrupt 0.1.0
Handles keyboard interrupt silently and gracefully
Requires Python: >=3.8
Keywords: bar, foo

# shhhinterrupt

Gracefully and shhh... _(silently)_ handles keyboard interrupts.

You can either pass a string to print, e.g. `@handle_interrupt("Please come again.")` or you can use the decorator without parentheses to use the default message `@handle_interrupt`.

Full example:

    from shhhinterrupt import handle_interrupt
    import time
    
    @handle_interrupt("He walked away.")
    def main():
        print("What's your name?")
        time.sleep(5)
        print("Tony!")

    if __name__ == "main":
        main()