anitab-org / anitab-org/bridge-in-tech-backend
Improvement: Add typehints to Organization module
- 主要語言
- Python
- 星號
- 24
- 分支
- 80
- PR 合併指標
- 30 天內沒有已合併 PR
描述
## 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.
```python
def get_organization(user_id: int, user_name: str):
representative_additional_info = UserExtensionModel.find_by_user_id(user_id)
...
...
```
## Resources
Typehints cheatsheet - [Click Here](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html)
## 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
貢獻指南
評估
這個 Issue 還沒有評估資料。