Skip to content

Conversation

@cav-adhoc
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 26, 2025 21:17
@roboadhoc
Copy link

Pull request status dashboard

Copy link

Copilot AI left a 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) y datetime.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 None en _prepare_interest_invoice cuando no hay deuda

@cav-adhoc cav-adhoc force-pushed the 19.0-t-59204-ctypes-cav branch from a1d66b5 to 8b4a663 Compare December 30, 2025 18:46
Copy link

Copilot AI left a 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]]:
Copy link

Copilot AI Dec 30, 2025

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.

Copilot uses AI. Check for mistakes.

def _update_deuda(self, deuda, partner, key, value):
def _update_deuda(
self, deuda: dict["Partner", dict[str, float]], partner: "Partner", key: str, value: float
Copy link

Copilot AI Dec 30, 2025

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants