bridge-in-tech-backend
bridge-in-tech-backend copied to clipboard
Improvement: Add typehints to Organization module
Description
Type hinting is a formal solution to statically indicate the type of a value within your Python code.
As a developer, I need to add typehints to my code to build and maintain a cleaner architecture and catch certain errors along the way.
Mocks
https://github.com/anitab-org/bridge-in-tech-backend/blob/68d8ff9a8640cef1d3e53b2b0dd9b80e3d750fd7/app/api/dao/organization.py#L179-L182 Here's how to add typehints in above function.
def get_organization(user_id: int, user_name: str):
representative_additional_info = UserExtensionModel.find_by_user_id(user_id)
...
...
Resources
Typehints cheatsheet - Click Here
Acceptance Criteria
Update [Required]
- [ ] Added correct typehints in the files related to Organization module.
Definition of Done
- [ ] All of the required items are completed.
- [ ] Approval by 1 mentor.
Estimation
1-2 hours
I would like to work on this task. Please assign it to me. Thanks.
I would like to work on this task. Please assign it to me. Thanks.
Hi there! You need to complete #244 first.
I would like to work on this task, Please assign it to me.