Skip to content

Commit

Permalink
Corrige les annotations MyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauko Quiroga committed Jan 2, 2020
1 parent b3dcc58 commit 6da13d6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions openfisca_france/model/prestations/logement_social.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from numpy import logical_not as not_, ndarray, select
from numpy.core.defchararray import startswith

Expand Down Expand Up @@ -67,14 +69,10 @@ class zone_logement_social(Variable):
definition_period = MONTH
label = "Zone logement social"

def formula(menage: GroupPopulation, period: Period) -> ndarray:
depcom: ndarray = menage('depcom', period)

in_paris_communes_limitrophes: ndarray = any(
paris_communes_limitrophes == depcom
)

in_idf: ndarray = any(startswith(depcom, departements_idf))
def formula(menage: GroupPopulation, period: Period) -> ZoneLogementSocial:
depcom: ndarray[bytes] = menage('depcom', period)
in_paris_communes_limitrophes: bool = any(paris_communes_limitrophes == depcom)
in_idf: bool = any(startswith(depcom, departements_idf))

return select(
[
Expand Down

0 comments on commit 6da13d6

Please sign in to comment.