-
Notifications
You must be signed in to change notification settings - Fork 132
[IMP] *: use of ctypes in account-finnancial-tools #856
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
base: 19.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Este PR introduce anotaciones de tipo (type hints) en el módulo account_interests para mejorar la claridad del código y habilitar verificaciones estáticas de tipos.
- Añade importaciones de
typing(TYPE_CHECKING,Any) ydatetime.date - Agrega anotaciones de tipo a métodos clave:
_update_deuda,_calculate_debts, y_prepare_interest_invoice - Introduce importaciones condicionales de tipos para evitar dependencias circulares usando
TYPE_CHECKING - Mejora el retorno explícito de
Noneen_prepare_interest_invoicecuando no hay deuda
3f20d7d to
a1d66b5
Compare
a1d66b5 to
8b4a663
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
| def _calculate_debts(self, from_date, to_date, groupby=None): | ||
| def _calculate_debts( | ||
| self, from_date: date, to_date: date, groupby: list[str] | None = None | ||
| ) -> dict["Partner", dict[str, float]]: |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El tipo de retorno tiene una sintaxis incorrecta. Dentro de los parámetros genéricos de dict[...], la referencia a Partner no debe estar entre comillas. Debería ser dict[Partner, dict[str, float]] en lugar de dict["Partner", dict[str, float]]. Las comillas solo se necesitan en anotaciones de parámetros directos como partner: "Partner", pero no dentro de genéricos donde se usa el tipo importado directamente.
|
|
||
| def _update_deuda(self, deuda, partner, key, value): | ||
| def _update_deuda( | ||
| self, deuda: dict["Partner", dict[str, float]], partner: "Partner", key: str, value: float |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El tipo del parámetro deuda tiene una sintaxis incorrecta. Dentro de los parámetros genéricos de dict[...], la referencia a Partner no debe estar entre comillas. Debería ser dict[Partner, dict[str, float]] en lugar de dict["Partner", dict[str, float]]. Las comillas solo se usan para el tipo del parámetro partner porque es una anotación directa, pero dentro de los genéricos se usa el tipo importado directamente.

No description provided.