Skip to content

Commit

Permalink
Return is a statement, not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
eraviart committed Jun 9, 2023
1 parent 60b834b commit 10b5b26
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -2968,22 +2968,22 @@ def formula(individu, period, parameters):
aacc_defn = individu('aacc_defn', period)
aacc_defs = individu('aacc_defs', period)
aacc_timp = max_(0, aacc_impn - aacc_defn - aacc_defs)
return(aacc_timp)
return aacc_timp

def formula_2009_01_01(individu, period, parameters):
aacc_impn = individu('aacc_impn', period)
alnp_defs = individu('alnp_defs', period)
aacc_defn = individu('aacc_defn', period)
aacc_defs = individu('aacc_defs', period)
aacc_timp = max_(0, aacc_impn + max_(0, - alnp_defs) - aacc_defn - aacc_defs)
return(aacc_timp)
return aacc_timp

def formula_2010_01_01(individu, period, parameters):
aacc_impn = individu('aacc_impn', period)
alnp_defs = individu('alnp_defs', period)
aacc_defn = individu('aacc_defn', period)
aacc_timp = max_(0, aacc_impn + max_(0, - alnp_defs) - aacc_defn)
return(aacc_timp)
return aacc_timp

def formula_2011_01_01(individu, period, parameters):
aacc_impn = individu('aacc_impn', period)
Expand All @@ -3006,7 +3006,7 @@ def formula_2011_01_01(individu, period, parameters):
+ max_(0, - alnp_defs) - aacc_defn
)
)
return(aacc_timp)
return aacc_timp

def formula_2012_01_01(individu, period, parameters):
aacc_impn = individu('aacc_impn', period)
Expand Down Expand Up @@ -3035,7 +3035,7 @@ def formula_2012_01_01(individu, period, parameters):
+ max_(0, nacc_defs - alnp_defs) - aacc_defn
)
)
return(aacc_timp)
return aacc_timp

def formula_2017_01_01(individu, period, parameters):
aacc_impn = individu('aacc_impn', period)
Expand Down Expand Up @@ -3069,7 +3069,7 @@ def formula_2017_01_01(individu, period, parameters):
+ max_(0, nacc_defs - alnp_defs) - aacc_defn
)
)
return(aacc_timp)
return aacc_timp


class atimp(Variable):
Expand All @@ -3094,7 +3094,7 @@ def formula(individu, period, parameters):
abnc_timp = abnc_impo - abnc_defi
# Total
atimp = arag_impg + abic_timp + aacc_timp + abnc_timp
return(atimp)
return atimp

def formula_2010_01_01(individu, period, parameters):
abic_impn = individu('abic_impn', period)
Expand All @@ -3110,7 +3110,7 @@ def formula_2010_01_01(individu, period, parameters):
abnc_timp = abnc_impo - abnc_defi
# Total
atimp = arag_impg + abic_timp + aacc_timp + abnc_timp
return(atimp)
return atimp


class nbnc_timp(Variable):
Expand All @@ -3124,7 +3124,7 @@ def formula(individu, period, parameters):
nbnc_defi = individu('nbnc_defi', period)
# regime de la déclaration contrôlée ne bénéficiant pas de l'abattement association agréée
nbnc_timp = nbnc_impo - nbnc_defi
return(nbnc_timp)
return nbnc_timp


class nacc_timp(Variable):
Expand All @@ -3138,7 +3138,7 @@ def formula(individu, period, parameters):
nacc_defn = individu('nacc_defn', period)
# Régime du bénéfice réel ne bénéficiant pas de l'abattement CGA
nacc_timp = max_(0, nacc_impn - nacc_defn)
return(nacc_timp)
return nacc_timp


class ntimp(Variable):
Expand All @@ -3157,7 +3157,7 @@ def formula(individu, period, parameters):
# Régime du bénéfice réel ne bénéficiant pas de l'abattement CGA
nbic_timp = (nbic_impn + nbic_imps) - (nbic_defn + nbic_defs)
ntimp = nacc_timp + nbnc_timp + nbic_timp
return(ntimp)
return ntimp

def formula_2006_01_01(individu, period, parameters):
nbic_impn = individu('nbic_impn', period)
Expand All @@ -3172,7 +3172,7 @@ def formula_2006_01_01(individu, period, parameters):
nbic_timp = (nbic_impn + nbic_imps) - (nbic_defn + nbic_defs)
cncn_timp = max_(0, cncn_bene - cncn_defi)
ntimp = nbic_timp + nacc_timp + nbnc_timp + cncn_timp
return(ntimp)
return ntimp

def formula_2007_01_01(individu, period, parameters):
# Moyenne triennale
Expand All @@ -3189,7 +3189,7 @@ def formula_2007_01_01(individu, period, parameters):
nbic_timp = (nbic_impn + nbic_imps) - (nbic_defn + nbic_defs)
cncn_timp = max_(0, cncn_bene - cncn_defi)
ntimp = nrag_impg + nbic_timp + nacc_timp + cncn_timp + nbnc_timp
return(ntimp)
return ntimp

def formula_2010_01_01(individu, period, parameters):
nrag_impg = individu('nrag_impg', period)
Expand All @@ -3203,7 +3203,7 @@ def formula_2010_01_01(individu, period, parameters):
nbic_timp = nbic_impn - nbic_defn
cncn_timp = max_(0, cncn_bene - cncn_defi)
ntimp = nrag_impg + nbic_timp + nacc_timp + cncn_timp + nbnc_timp
return(ntimp)
return ntimp


class revenu_non_salarie(Variable):
Expand All @@ -3224,7 +3224,7 @@ def formula(individu, period, parameters):
majo_cga = max_(0, cga_taux2 * (ntimp + rpns_frag)) # Pour ne pas avoir à majorer les déficits
def_agri = f5sq + arag_defi + (1 + cga_taux2) * nrag_defi
revenus_non_salaries = rpns_frag + frag_fore + atimp + ntimp + majo_cga - def_agri
return(revenus_non_salaries)
return revenus_non_salaries

def formula_2016_01_01(individu, period, parameters):
rpns_mrag = individu('rpns_revenus_microBA_agricole', period)
Expand All @@ -3238,7 +3238,7 @@ def formula_2016_01_01(individu, period, parameters):
majo_cga = max_(0, cga_taux2 * ntimp) # Pour ne pas avoir à majorer les déficits
def_agri = f5sq + arag_defi + (1 + cga_taux2) * nrag_defi
revenus_non_salaries = rpns_mrag + coupe_bois + atimp + ntimp + majo_cga - def_agri
return(revenus_non_salaries)
return revenus_non_salaries


class locations_pro(Variable):
Expand All @@ -3251,11 +3251,11 @@ def formula_2009_01_01(individu, period, parameters):
abic_impm = individu('abic_impm', period)
abic_defm = individu('abic_defm', period)
alnp_imps = individu('alnp_imps', period)
return(abic_impm - abic_defm + alnp_imps)
return abic_impm - abic_defm + alnp_imps

def formula_2016_01_01(individu, period, parameters):
alnp_imps = individu('alnp_imps', period)
return(alnp_imps)
return alnp_imps


class rpns_imposables(Variable):
Expand Down

0 comments on commit 10b5b26

Please sign in to comment.