Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace magic strings with constants #8453

Closed
wants to merge 29 commits into from

Conversation

Sergius-Nyah
Copy link

Previously, the strings 'win32' and 'darwin' are used in the code. These could be replaced with constants.
WINDOWS_PLATFORM = 'win32' and MACOS_PLATFORM = 'darwin'
". This change improves code readability by avoiding the use of magic strings."

…es including documenting argument groups, individual arguments, adding notes, and documenting models, which made the method quite large and cumbersome. To improve this, I refactored the method into smaller and more manageable methods which handle a single responsibility.
… HelpCommandDocumentEventHandler class. They included 'Description','Synopsis', 'Options', and 'Output'. To improve this, I defined these constants globally at the top of each classes, such that if we need to change any of these constants in the future, we can do it in one place and the changes will propagate throughout the code
… aroud the _map_handlers, now errors will be handled gracefully
@kellertk kellertk closed this May 7, 2024
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.

None yet

2 participants