Skip to content

refactor: use enum for mode cli arg#83

Merged
j-g00da merged 2 commits intochatmail:mainfrom
DarkCat09:dc09/mode-enum
Mar 5, 2026
Merged

refactor: use enum for mode cli arg#83
j-g00da merged 2 commits intochatmail:mainfrom
DarkCat09:dc09/mode-enum

Conversation

@DarkCat09
Copy link
Contributor

A small code style change replacing mode string comparison (more of a Python-way thing) with an enum.

The problem is that mode gets compared twice, when validating its value and, next, when deciding what server to start. We should either define a constant, or simply parse the string only once and operate with an internal representation (this PR is the second approach)

Copy link
Collaborator

@j-g00da j-g00da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! One minor suggestion

@j-g00da j-g00da merged commit 3821f60 into chatmail:main Mar 5, 2026
7 checks passed
@DarkCat09 DarkCat09 deleted the dc09/mode-enum branch March 5, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants