[PR #80] [MERGED] Use Enum for coloring options #92

Closed
opened 2026-03-02 16:48:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/initialcommit-com/git-sim/pull/80
Author: @paketb0te
Created: 4/7/2023
Status: Merged
Merged: 4/9/2023
Merged by: @initialcommit-io

Base: devHead: color_by


📝 Commits (4)

  • cc116cb Bump version to 0.2.9
  • 684f5b0 Use Enum for coloring options
  • b35488b update help string for option
  • 57b4049 use Union[..., None] instead of Optional[...] for backwards compatibility

📊 Changes

5 files changed (+37 additions, -28 deletions)

View changed files

📝 git_sim/__main__.py (+8 -8)
📝 git_sim/enums.py (+17 -0)
📝 git_sim/git_sim_base_command.py (+8 -7)
📝 git_sim/settings.py (+3 -12)
📝 setup.py (+1 -1)

📄 Description

Also move some stray Enums into git-sim.enums.py.

Enums have two advantages here, they:

  • show all options when using git-sim --help
  • help avoid typos in the string comparison in git_sim_base_command's color_by() function

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/initialcommit-com/git-sim/pull/80 **Author:** [@paketb0te](https://github.com/paketb0te) **Created:** 4/7/2023 **Status:** ✅ Merged **Merged:** 4/9/2023 **Merged by:** [@initialcommit-io](https://github.com/initialcommit-io) **Base:** `dev` ← **Head:** `color_by` --- ### 📝 Commits (4) - [`cc116cb`](https://github.com/initialcommit-com/git-sim/commit/cc116cbb8d250f7f2fd0d3183e6c2965f5821fd3) Bump version to 0.2.9 - [`684f5b0`](https://github.com/initialcommit-com/git-sim/commit/684f5b028b8a3eecef91d3d95c0d1fb6c23ba5cf) Use Enum for coloring options - [`b35488b`](https://github.com/initialcommit-com/git-sim/commit/b35488bc821e05b9b70332f7095bd0171a01b883) update help string for option - [`57b4049`](https://github.com/initialcommit-com/git-sim/commit/57b4049337ae2d0324227816b969dba90e51f788) use Union[..., None] instead of Optional[...] for backwards compatibility ### 📊 Changes **5 files changed** (+37 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `git_sim/__main__.py` (+8 -8) 📝 `git_sim/enums.py` (+17 -0) 📝 `git_sim/git_sim_base_command.py` (+8 -7) 📝 `git_sim/settings.py` (+3 -12) 📝 `setup.py` (+1 -1) </details> ### 📄 Description Also move some stray Enums into git-sim.enums.py. Enums have two advantages here, they: - show all options when using git-sim --help - help avoid typos in the string comparison in git_sim_base_command's color_by() function --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 16:48:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-sim#92
No description provided.