Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Avoid hardcoded strings across the codebase #173

Closed
bigspider opened this issue Jul 9, 2020 · 0 comments · Fixed by #228
Closed

Avoid hardcoded strings across the codebase #173

bigspider opened this issue Jul 9, 2020 · 0 comments · Fixed by #228
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@bigspider
Copy link
Collaborator

There are many instances were a value can only be one of multiple strings, like the appointment status that can be "not_found", "being_watched" or "dispute_responded". In this and all the other similar cases we should avoid hard-coding the string, for example by using an Enum. For example we could have and AppointmentStatus enum, with keys AppointmentStatus.NOT_FOUND, AppointmentStatus.BEING_WATCHED and AppointmentStatus.DISPUTE_RESPONDED. This will protect against typos and make future refactorings much easier, should there ever be a need of changing the allowed values.

@bigspider bigspider added the good first issue Good for newcomers label Jul 9, 2020
@sr-gi sr-gi added this to the v0.1.1 milestone Sep 9, 2020
@sr-gi sr-gi linked a pull request Sep 15, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants