Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Oct 11, 2023
1 parent 9b19587 commit aef60f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
12 changes: 1 addition & 11 deletions openfisca_survey_manager/scenarios/reform_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@


from openfisca_survey_manager.scenarios.abstract_scenario import AbstractSurveyScenario
# from openfisca_core import periods
# from openfisca_survey_manager.simulations import Simulation # noqa analysis:ignore
# from openfisca_core.simulation_builder import SimulationBuilder
# from openfisca_core.indexed_enums import Enum
# from openfisca_core.periods import MONTH, YEAR, ETERNITY
# from openfisca_core.tools.simulation_dumper import dump_simulation, restore_simulation

# from openfisca_survey_manager.calibration import Calibration
from openfisca_survey_manager import default_config_files_directory
# from openfisca_survey_manager.survey_collections import SurveyCollection
# from openfisca_survey_manager.surveys import Survey


log = logging.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion openfisca_survey_manager/simulation_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from openfisca_core.model_api import MONTH, YEAR
from openfisca_core.simulations.simulation_builder import SimulationBuilder
from openfisca_survey_manager.utils import do_nothing


SimulationBuilder.id_variable_by_entity_key = None
Expand Down Expand Up @@ -48,6 +47,7 @@ def _set_id_variable_by_entity_key(builder) -> Dict[str, str]:

return builder.id_variable_by_entity_key


def _set_role_variable_by_entity_key(builder) -> Dict[str, str]:
"""Identify and sets the correct roles for the different entities."""
if builder.role_variable_by_entity_key is None:
Expand All @@ -56,6 +56,7 @@ def _set_role_variable_by_entity_key(builder) -> Dict[str, str]:

return builder.role_variable_by_entity_key


def _set_used_as_input_variables_by_entity(builder) -> Dict[str, List[str]]:
"""Identify and sets the correct input variables for the different entities."""
if builder.used_as_input_variables_by_entity is not None:
Expand Down
2 changes: 1 addition & 1 deletion openfisca_survey_manager/simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from openfisca_core import periods
from openfisca_core.indexed_enums import Enum
from openfisca_core.periods import ETERNITY, MONTH, YEAR
from openfisca_core.types import Array, Period, Simulation, TaxBenefitSystem
from openfisca_core.types import Array, Period, TaxBenefitSystem
from openfisca_core.simulations import Simulation
from openfisca_survey_manager import default_config_files_directory
from openfisca_survey_manager.simulation_builder import diagnose_variable_mismatch, SimulationBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import logging
import unittest


from openfisca_survey_manager.tests.test_scenario import create_randomly_initialized_survey_scenario


log = logging.getLogger(__name__)


Expand All @@ -20,6 +21,7 @@ def test_create_data_frame_by_entity():
assert (df_by_entity['person']['salary'] == salary).all().all()
assert (df_by_entity['household']['rent'] == rent).all().all()


def test_create_data_frame_by_entity_with_index():
survey_scenario = create_randomly_initialized_survey_scenario()
period = '2017-01'
Expand Down

0 comments on commit aef60f8

Please sign in to comment.