Skip to content

Commit

Permalink
Apply wording suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Hajar AIT EL KADI <[email protected]>
  • Loading branch information
Mauko Quiroga and HAEKADI authored Aug 30, 2021
1 parent c2d99c7 commit 56bd358
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions openfisca_core/commons/rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def average_rate(
"""Computes the average rate of a target net income.
Given a `target` net income, and according to the `varying` gross income.
Optionally, a `trim` can be applied consisting on the lower and upper
Optionally, a `trim` can be applied consisting of the lower and the upper
bounds of the average rate to be computed.
Args:
Expand Down Expand Up @@ -69,7 +69,7 @@ def marginal_rate(
"""Computes the marginal rate of a target net income.
Given a `target` net income, and according to the `varying` gross income.
Optionally, a `trim` can be applied consisting on the lower and upper
Optionally, a `trim` can be applied consisting of the lower and the upper
bounds of the marginal rate to be computed.
Args:
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/commons/tests/test_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def test_dummy_deprecation():
"""When instantiated Dummy throws a deprecation warning."""
"""Dummy throws a deprecation warning when instantiated."""

with pytest.warns(DeprecationWarning):
result = Dummy()
Expand Down
6 changes: 3 additions & 3 deletions openfisca_core/commons/tests/test_formulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_apply_thresholds_when_several_inputs():


def test_apply_thresholds_when_too_many_thresholds():
"""When thresholds > choices it raises an AssertionError."""
"""Raises an AssertionError when thresholds > choices."""

input_ = numpy.array([6])
thresholds = [5, 7, 9, 11]
Expand All @@ -32,7 +32,7 @@ def test_apply_thresholds_when_too_many_thresholds():


def test_apply_thresholds_when_too_many_choices():
"""When thresholds < choices - 1 it raises an AssertionError."""
"""Raises an AssertionError when thresholds < choices - 1."""

input_ = numpy.array([6])
thresholds = [5, 7]
Expand All @@ -44,7 +44,7 @@ def test_apply_thresholds_when_too_many_choices():


def test_switch_when_values_are_empty():
"""When the values are empty it raises an AssertionError."""
"""Raises an AssertionError when the values are empty it."""

conditions = [1, 1, 1, 2]
value_by_condition = {}
Expand Down
1 change: 1 addition & 0 deletions openfisca_core/entities/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def build_entity(
<openfisca_core.entities.entity.Entity...
"""

if is_person:
return entities.Entity(key, plural, label, doc)
else:
Expand Down
1 change: 1 addition & 0 deletions openfisca_core/entities/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Role:
... }
>>> Role(description, object())
Role(parent)
"""

entity: Entity
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/entities/tests/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def test_check_role_validity_when_not_role():
"""When it gets an invalid role it raises a ValueError."""
"""Raises a ValueError when it gets an invalid role."""

with pytest.raises(ValueError):
entity = Entity("key", "label", "plural", "doc")
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/entities/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def test_build_group_entity_without_roles():
"""When its called without roles it raises a TypeError."""
"""Raises a TypeError when it's called without roles."""

build_entity = functools.partial(helpers.build_entity, "", "", "")

Expand Down

0 comments on commit 56bd358

Please sign in to comment.