Skip to content

Commit

Permalink
Duration class changes
Browse files Browse the repository at this point in the history
Import the class in the package's init file and force constructor to only accept kwargs
  • Loading branch information
dimitarOnGithub committed Aug 3, 2024
1 parent a495cd9 commit 236e97c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion temporals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from datetime import time, date, datetime
from .utils import get_datetime
from .periods import DatePeriod, TimePeriod, DatetimePeriod
from .periods import DatePeriod, TimePeriod, DatetimePeriod, Duration


__all__ = [
'PeriodFactory',
'DatePeriod',
'TimePeriod',
'DatetimePeriod',
'Duration',
'get_datetime',
]

Expand Down
1 change: 1 addition & 0 deletions temporals/periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ def get_disconnect(self,
class Duration:

def __init__(self,
*,
period: Period = None,
start: time | date | datetime = None,
end: time | date | datetime = None):
Expand Down

0 comments on commit 236e97c

Please sign in to comment.