Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: consolidate periods module types #1302

Open
wants to merge 1 commit into
base: refactor/consolidate-tracers-types
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions openfisca_core/periods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#
# See: https://www.python.org/dev/peps/pep-0008/#imports

from . import types
from ._errors import InstantError, ParserError, PeriodError
from .config import (
INSTANT_PATTERN,
Expand Down Expand Up @@ -52,27 +51,26 @@

__all__ = [
"DAY",
"DateUnit",
"ETERNITY",
"INSTANT_PATTERN",
"ISOCALENDAR",
"ISOFORMAT",
"MONTH",
"WEEK",
"WEEKDAY",
"YEAR",
"DateUnit",
"Instant",
"InstantError",
"MONTH",
"ParserError",
"Period",
"PeriodError",
"WEEK",
"WEEKDAY",
"YEAR",
"date_by_instant_cache",
"instant",
"instant_date",
"key_period_size",
"period",
"str_by_instant_cache",
"types",
"unit_weight",
"unit_weights",
"year_or_month_or_day_re",
Expand Down
3 changes: 2 additions & 1 deletion openfisca_core/periods/_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

import pendulum

from . import types as t
from openfisca_core import types as t

from ._errors import InstantError, ParserError, PeriodError
from .date_unit import DateUnit
from .instant_ import Instant
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/periods/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pendulum

from . import types as t
from openfisca_core import types as t

# Matches "2015", "2015-01", "2015-01-01"
# Does not match "2015-13", "2015-12-32"
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/periods/date_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from strenum import StrEnum

from . import types as t
from openfisca_core import types as t


class DateUnitMeta(EnumMeta):
Expand Down
4 changes: 3 additions & 1 deletion openfisca_core/periods/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import pendulum

from . import config, types as t
from openfisca_core import types as t

from . import config
from ._errors import InstantError, PeriodError
from ._parsers import parse_instant, parse_period
from .date_unit import DateUnit
Expand Down
4 changes: 3 additions & 1 deletion openfisca_core/periods/instant_.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import pendulum

from . import config, types as t
from openfisca_core import types as t

from . import config
from .date_unit import DateUnit


Expand Down
4 changes: 3 additions & 1 deletion openfisca_core/periods/period_.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import pendulum

from . import helpers, types as t
from openfisca_core import types as t

from . import helpers
from .date_unit import DateUnit
from .instant_ import Instant

Expand Down
183 changes: 0 additions & 183 deletions openfisca_core/periods/types.py

This file was deleted.

Loading
Loading