anitab-org / anitab-org/bridge-in-tech-backend
Improvement: Add typehints to Organization module
- Lingua principale
- Python
- Stelle
- 24
- Fork
- 80
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## 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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.