Skip to content
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

Ipp 10 : Update et corrige le crédit d'impôt 'aidper' #916

Merged
merged 15 commits into from
Apr 6, 2018

Conversation

claireleroy
Copy link
Contributor

Les modifications de cette PR sont comparées à la branche ipp-update-tax-reduction-cappme (#915)

  • Évolution du système socio-fiscal.
  • Périodes concernées : à partir du 01/01/2012
  • Zones impactées :
  • openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impots.py.
  • openfisca_france/parameters/impot_revenu/credits_impot/aidper/max_wl.yaml
  • Détails :
    • Mise à jour de la formule (2014-2016) du crédit d'impôt 'aidper'
    • Correction de la formule du crédit d'impôt en 2012 et 2013
    • Ajout d'un nouveau paramètre associé

Ces changements :

  • Ajoutent une fonctionnalité (par exemple ajout d'une variable).
  • Corrigent ou améliorent un calcul déjà existant.

@@ -420,20 +420,21 @@ def formula_2012_01_01(foyer_fiscal, period, parameters):
_P = parameters(period)

P = _P.impot_revenu.credits_impot.aidper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactorer _P

P.taux_wj * min_(f7wj, max1) + P.taux_wi * min_(f7wi, max2))
max1 = max_(0, max0 - f7wj) # f7wj s'impute avant f7wl et f7wi
max2 = max_(0, max1 - f7wi) # f7wi s'impute avant f7wl
return (P.taux_wr * f7wr +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

@@ -443,20 +444,20 @@ def formula_2013_01_01(foyer_fiscal, period, parameters):
_P = parameters(period)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem


return (P.taux_wr * f7wr + P.taux_wl * min_(f7wl, max00) + P.taux_wl * max_(f7wl - max00, 0) + P.taux_wj *
min_(f7wj, max1))
return (P.taux_wr * f7wr +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

@@ -466,16 +467,14 @@ def formula_2014_01_01(foyer_fiscal, period, parameters):
_P = parameters(period)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

P.taux_wr * f7wr + P.taux_wl * min_(f7wl, max00) + P.taux_wl * max_(f7wl - max00, 0) +
P.taux_wj * min_(f7wj, max1)
)
return (P.taux_wr * f7wr +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

_P = parameters(period)

P = _P.impot_revenu.credits_impot.aidper
P = parameters(period).impot_revenu.credits_impot.aidper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

P.taux_wj * min_(f7wj, max1) + P.taux_wi * min_(f7wi, max2))
max1 = max_(0, max0 - f7wj) # f7wj s'impute avant f7wl et f7wi
max2 = max_(0, max1 - f7wi) # f7wi s'impute avant f7wl
return (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il vaut mieux mettre les opérateurs (+ ) en début de ligne qu'en fin de ligne : https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator

@claireleroy claireleroy force-pushed the ipp-update-tax-credit-aidper branch from 0a2dc73 to f94ab8b Compare April 6, 2018 07:32
@claireleroy claireleroy changed the base branch from ipp-update-tax-reduction-cappme to master April 6, 2018 07:33
* Évolution du système socio-fiscal.
* Zones impactées :
- `openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impots`
- `openfisca_france/parameters/impot_revenu/credits_impot/aidper/max_wl`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut ajouter la période impactée

@@ -2734,7 +2734,7 @@ def formula_2016_01_01(foyer_fiscal, period, parameters):
+ P.report12 * min_(f7th + f7uu + f7uv + f7ti, max2)
)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra-white space

@benjello benjello self-requested a review April 6, 2018 08:39
@claireleroy claireleroy merged commit 5597c19 into master Apr 6, 2018
@claireleroy claireleroy deleted the ipp-update-tax-credit-aidper branch April 9, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants