-
Notifications
You must be signed in to change notification settings - Fork 18
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
Code sanitisation #159
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the issue that our team has discussed with you in one of the previous pull request. I want to create this to formalise the task.
I noticed that the code contained repetition of raw string such as df['hour'], df['minute']. These repetitions can cause run-time errors(i.e. errors that are not caught during "compile" time, but only when the user interact with the UI) if someone accidentally mispell a string (e.g. "hours" instead of "hour").
A solution I learned at the workplace is putting these raw strings into variables. hour = "hour", minute ="minute". Putting these variable in classes if necessary. This will avoid repeting raw string, as well as allowing IDE suggestions
The text was updated successfully, but these errors were encountered: