Skip to content

Commit d05b3aa

Browse files
committed
Bump version
1 parent 2f8072f commit d05b3aa

File tree

22 files changed

+80
-132
lines changed

22 files changed

+80
-132
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### 41.5.6 [#1185](https://github.com/openfisca/openfisca-core/pull/1185)
4+
5+
#### Technical changes
6+
7+
- Remove pre Python 3.9 syntax.
8+
39
### 41.5.5 [#1220](https://github.com/openfisca/openfisca-core/pull/1220)
410

511
#### Technical changes

openfisca_core/entities/_core_entity.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
4-
53
import os
64
from abc import abstractmethod
75

6+
from . import types as t
87
from .role import Role
98

10-
if TYPE_CHECKING:
11-
from . import types as t
12-
139

1410
class _CoreEntity:
1511
"""Base class to build entities from."""

openfisca_core/entities/group_entity.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
3+
from collections.abc import Iterable, Sequence
44

55
import textwrap
66
from itertools import chain
@@ -9,9 +9,6 @@
99
from ._core_entity import _CoreEntity
1010
from .role import Role
1111

12-
if TYPE_CHECKING:
13-
from collections.abc import Iterable, Sequence
14-
1512

1613
class GroupEntity(_CoreEntity):
1714
"""Represents an entity containing several others with different roles.

openfisca_core/entities/helpers.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
3+
from collections.abc import Iterable, Sequence
44

5+
from . import types as t
56
from .entity import Entity
67
from .group_entity import GroupEntity
78

8-
if TYPE_CHECKING:
9-
from collections.abc import Iterable, Sequence
10-
11-
from . import types as t
12-
139

1410
def build_entity(
1511
key: str,

openfisca_core/entities/role.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from collections.abc import Iterable, Mapping
4+
from typing import Any
45

56
import dataclasses
67
import textwrap
78

8-
if TYPE_CHECKING:
9-
from collections.abc import Iterable, Mapping
10-
11-
from .types import SingleEntity
9+
from .types import SingleEntity
1210

1311

1412
class Role:

openfisca_core/entities/types.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, NewType, Protocol
3+
from collections.abc import Iterable
4+
from typing import NewType, Protocol
45
from typing_extensions import Required, TypedDict
56

67
from openfisca_core import types as t
78

8-
if TYPE_CHECKING:
9-
from collections.abc import Iterable
10-
119
# Entities
1210

1311
#: For example "person".

openfisca_core/errors/situation_parsing_error.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
3+
from collections.abc import Iterable
44

55
import os
66

77
import dpath.util
88

9-
if TYPE_CHECKING:
10-
from collections.abc import Iterable
11-
129

1310
class SituationParsingError(Exception):
1411
"""Exception raised when the situation provided as an input for a simulation cannot be parsed."""

openfisca_core/holders/holder.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from collections.abc import Sequence
4+
from typing import Any
45

56
import os
67
import warnings
@@ -20,9 +21,6 @@
2021

2122
from .memory_usage import MemoryUsage
2223

23-
if TYPE_CHECKING:
24-
from collections.abc import Sequence
25-
2624

2725
class Holder:
2826
"""A holder keeps tracks of a variable values after they have been calculated, or set as an input."""

openfisca_core/projectors/helpers.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
3+
from collections.abc import Mapping
44

5-
from openfisca_core import entities, projectors
6-
7-
if TYPE_CHECKING:
8-
from collections.abc import Mapping
5+
from openfisca_core.types import GroupEntity, Role, SingleEntity
96

10-
from openfisca_core.types import GroupEntity, Role, SingleEntity
7+
from openfisca_core import entities, projectors
118

12-
from .typing import GroupPopulation, Population
9+
from .typing import GroupPopulation, Population
1310

1411

1512
def projectable(function):

openfisca_core/projectors/typing.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Protocol
3+
from collections.abc import Mapping
4+
from typing import Protocol
45

5-
if TYPE_CHECKING:
6-
from collections.abc import Mapping
7-
8-
from openfisca_core.types import GroupEntity, SingleEntity
6+
from openfisca_core.types import GroupEntity, SingleEntity
97

108

119
class Population(Protocol):

0 commit comments

Comments
 (0)