Skip to content

Commit

Permalink
chore(version): bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Sep 17, 2024
1 parent f652724 commit d2960a8
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 68 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 41.5.5 [#1220](https://github.com/openfisca/openfisca-core/pull/1220)

#### Technical changes

- Fix doc & type definitions in the entities module

### 41.5.4 [#1219](https://github.com/openfisca/openfisca-core/pull/1219)

#### Technical changes
Expand Down
23 changes: 9 additions & 14 deletions openfisca_core/entities/types.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
from __future__ import annotations

from collections.abc import Iterable
from typing import Protocol, TypedDict
from typing import Protocol
from typing_extensions import TypedDict

from openfisca_core import types
from openfisca_core import types as t

# Entities


class CoreEntity(types.CoreEntity, Protocol):
...


class SingleEntity(types.SingleEntity, Protocol):
class CoreEntity(t.CoreEntity, Protocol):
key: str
plural: str | None

class SingleEntity(t.SingleEntity, Protocol):
...


class GroupEntity(types.GroupEntity, Protocol):
class GroupEntity(t.GroupEntity, Protocol):
...


class Role(types.Role, Protocol):
max: int | None
class Role(t.Role, Protocol):
subroles: Iterable[Role] | None

@property
def key(self) -> str:
...


class RoleParams(TypedDict, total=False):
key: str
Expand Down
5 changes: 5 additions & 0 deletions openfisca_core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ class GroupEntity(CoreEntity, Protocol):

class Role(Protocol):
entity: Any
max: int | None
subroles: Any

@property
def key(self) -> str:
...


# Holders

Expand Down
116 changes: 63 additions & 53 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,76 +1,86 @@
# C011X: We (progressively) document the code base.
# D10X: We (progressively) check docstrings (see https://www.pydocstyle.org/en/2.1.1/error_codes.html#grouping).
# DARXXX: We (progressively) check docstrings (see https://github.com/terrencepreilly/darglint#error-codes).
# E203: We ignore a false positive in whitespace before ":" (see https://github.com/PyCQA/pycodestyle/issues/373).
# F403/405: We ignore * imports.
# R0401: We avoid cyclic imports —required for unit/doc tests.
# RST301: We use Google Python Style (see https://pypi.org/project/flake8-rst-docstrings/).
# W503/504: We break lines before binary operators (Knuth's style).
# C011X: We (progressively) document the code base.
# D10X: We (progressively) check docstrings (see https://www.pydocstyle.org/en/2.1.1/error_codes.html#grouping).
# DARXXX: We (progressively) check docstrings (see https://github.com/terrencepreilly/darglint#error-codes).
# E203: We ignore a false positive in whitespace before ":" (see https://github.com/PyCQA/pycodestyle/issues/373).
# F403/405: We ignore * imports.
# R0401: We avoid cyclic imports —required for unit/doc tests.
# RST301: We use Google Python Style (see https://pypi.org/project/flake8-rst-docstrings/).
# W503/504: We break lines before binary operators (Knuth's style).

[flake8]
convention = google
docstring_style = google
extend-ignore = D
ignore = E203, E501, F405, RST301, W503
in-place = true
include-in-doctest = openfisca_core/commons openfisca_core/entities openfisca_core/holders openfisca_core/periods openfisca_core/projectors
max-line-length = 88
per-file-ignores = */types.py:D101,D102,E704, */test_*.py:D101,D102,D103, */__init__.py:F401
rst-directives = attribute, deprecated, seealso, versionadded, versionchanged
rst-roles = any, attr, class, exc, func, meth, mod, obj
strictness = short
convention = google
docstring_style = google
extend-ignore = D
ignore = E203, E501, F405, RST301, W503
in-place = true
include-in-doctest = openfisca_core/commons openfisca_core/entities openfisca_core/holders openfisca_core/periods openfisca_core/projectors
max-line-length = 88
per-file-ignores = */types.py:D101,D102,E704, */test_*.py:D101,D102,D103, */__init__.py:F401
rst-directives = attribute, deprecated, seealso, versionadded, versionchanged
rst-roles = any, attr, class, exc, func, meth, mod, obj
strictness = short

[pylint.MASTER]
load-plugins = pylint_per_file_ignores
load-plugins = pylint_per_file_ignores

[pylint.message_control]
disable = all
enable = C0115, C0116, R0401
per-file-ignores =
disable = all
enable = C0115, C0116, R0401
per-file-ignores =
types.py:C0115,C0116
/tests/:C0116
score = no
score = no

[isort]
case_sensitive = true
case_sensitive = true
force_alphabetical_sort_within_sections = false
group_by_package = true
honor_noqa = true
include_trailing_comma = true
known_first_party = openfisca_core
known_openfisca = openfisca_country_template, openfisca_extension_template
known_typing = *collections.abc*, *typing*, *typing_extensions*
known_types = *types*
profile = black
py_version = 39
sections = FUTURE, TYPING, TYPES, STDLIB, THIRDPARTY, OPENFISCA, FIRSTPARTY, LOCALFOLDER
group_by_package = true
honor_noqa = true
include_trailing_comma = true
known_first_party = openfisca_core
known_openfisca = openfisca_country_template, openfisca_extension_template
known_typing = *collections.abc*, *typing*, *typing_extensions*
known_types = *types*
profile = black
py_version = 39
sections = FUTURE, TYPING, TYPES, STDLIB, THIRDPARTY, OPENFISCA, FIRSTPARTY, LOCALFOLDER

[coverage:paths]
source = . */site-packages
source = . */site-packages

[coverage:run]
branch = true
source = openfisca_core, openfisca_web_api
branch = true
source = openfisca_core, openfisca_web_api

[coverage:report]
fail_under = 75
show_missing = true
skip_covered = true
skip_empty = true
fail_under = 75
show_missing = true
skip_covered = true
skip_empty = true

[tool:pytest]
addopts = --disable-pytest-warnings --doctest-modules --showlocals
doctest_optionflags = ELLIPSIS IGNORE_EXCEPTION_DETAIL NUMBER NORMALIZE_WHITESPACE
python_files = **/*.py
testpaths = tests
addopts = --disable-pytest-warnings --doctest-modules --showlocals
doctest_optionflags = ELLIPSIS IGNORE_EXCEPTION_DETAIL NUMBER NORMALIZE_WHITESPACE
python_files = **/*.py
testpaths = tests

[mypy]
disallow_any_unimported = true
ignore_missing_imports = true
install_types = true
non_interactive = true
plugins = numpy.typing.mypy_plugin
python_version = 3.9
check_untyped_defs = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_expr = false
disallow_any_unimported = false
follow_imports = skip
ignore_missing_imports = true
implicit_reexport = false
install_types = true
non_interactive = true
plugins = numpy.typing.mypy_plugin
pretty = true
python_version = 3.9
strict = false
warn_no_return = true
warn_unreachable = true

[mypy-openfisca_core.*.tests.*]
ignore_errors = True
ignore_errors = True
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

setup(
name="OpenFisca-Core",
version="41.5.4",
version="41.5.5",
author="OpenFisca Team",
author_email="contact@openfisca.org",
classifiers=[
Expand Down

0 comments on commit d2960a8

Please sign in to comment.